在CLI上使用Composer安装时发生致命错误“类...未找到”

时间:2014-02-27 13:38:11

标签: laravel composer-php

我正在为laravel 4安装composer,并在CLI上点击composer install,然后点击Enter我得到以下错误/警告: `

F:\My Documents\WAMP\www\laravel-master>composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to u
pdate them.
Nothing to install or update
Generating autoload files
PHP Fatal error:  Class 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider' not found in F:\My Documents\WAMP\www\laravel-master
\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 123
PHP Stack trace:
PHP   1. {main}() F:\My Documents\WAMP\www\laravel-master\artisan:0
PHP   2. require_once() F:\My Documents\WAMP\www\laravel-master\artisan:30
PHP   3. require() F:\My Documents\WAMP\www\laravel-master\bootstrap\start.php:60
PHP   4. Illuminate\Foundation\ProviderRepository->load() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\src\Illuminate\Fo
undation\start.php:195
PHP   5. Illuminate\Foundation\ProviderRepository->compileManifest() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\src\Il
luminate\Foundation\ProviderRepository.php:51
PHP   6. Illuminate\Foundation\ProviderRepository->createProvider() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\src\Ill
uminate\Foundation\ProviderRepository.php:89
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Illuminate\\Foundation\\Providers\\ConsoleSup
portServiceProvider' not found","file":"F:\\My Documents\\WAMP\\www\\laravel-master\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation
\\ProviderRepository.php","line":123}}Script php artisan clear-compiled handling the post-install-cmd event returned with an error



  [RuntimeException]
  Error Output: PHP Fatal error:  Class 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider' not found in F:\My Documents\WAMP
  \www\laravel-master\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepository.php on line 123
  PHP Stack trace:
  PHP   1. {main}() F:\My Documents\WAMP\www\laravel-master\artisan:0
  PHP   2. require_once() F:\My Documents\WAMP\www\laravel-master\artisan:30
  PHP   3. require() F:\My Documents\WAMP\www\laravel-master\bootstrap\start.php:60
  PHP   4. Illuminate\Foundation\ProviderRepository->load() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\src\Illumina
  te\Foundation\start.php:195
  PHP   5. Illuminate\Foundation\ProviderRepository->compileManifest() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\s
  rc\Illuminate\Foundation\ProviderRepository.php:51
  PHP   6. Illuminate\Foundation\ProviderRepository->createProvider() F:\My Documents\WAMP\www\laravel-master\vendor\laravel\framework\sr
  c\Illuminate\Foundation\ProviderRepository.php:89




install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progre
ss] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]

可能是什么问题?我试过在谷歌上搜索但没有成功。

1 个答案:

答案 0 :(得分:1)

我成功了。这就是我做的:1。我在我的WAMP的bin / apache和bin / php文件夹中的2个php.ini文件上启用了openssl。 2.我最初使用Internet代理。我切换到调制解调器,我的困境结束了。这是成功的主要原因。我希望这一切对某人有帮助