我在Windows 10上安装FuelPHP,但在运行" php composer.phar install"时遇到致命错误。命令,但无法安装它。我得到的错误如下:
php composer.phar install --verbose
Warning: This development build of composer is over 30 days old. It is recommended to update it by running "composer.phar self-update" to get the latest version.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Fatal error: Class 'Config' not found in D:\projects\campaygn\src\fuel\core\classes\error.php on line 146
Fatal error: Class 'Config' not found in D:\projects\campaygn\src\fuel\core\bootstrap.php on line 47
Script php oil r install handling the post-install-cmd event returned with an error
[RuntimeException]
Error Output:
Exception trace:
() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:186
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/EventDispatcher/EventDispatcher.php:121
Composer\EventDispatcher\EventDispatcher->dispatchCommandEvent() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/Installer.php:337
Composer\Installer->run() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/Command/InstallCommand.php:131
Composer\Command\InstallCommand->execute() at phar://D:/projects/campaygn/src/composer.phar/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
Symfony\Component\Console\Command\Command->run() at phar://D:/projects/campaygn/src/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar://D:/projects/campaygn/src/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/Console/Application.php:146
Composer\Console\Application->doRun() at phar://D:/projects/campaygn/src/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar://D:/projects/campaygn/src/composer.phar/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar://D:/projects/campaygn/src/composer.phar/bin/composer:43
require() at D:\projects\campaygn\src\composer.phar:25
install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]
答案 0 :(得分:1)
如果项目文件夹中有多个composer.phar文件,则可能会出现此错误。 仔细查看您的文件夹并更新并安装所有作曲家。特别是src / fuel / app:p
答案 1 :(得分:0)
我无法提供很多帮助,但是here它说:
命令行安装 目前这只适用于* nix系统(Linux,OS X,Unix等)。