1

我尝试在 Windows 8 上安装 Laravel4。

我下载文件,解压缩,然后调用“composer update”,然后我收到以下消息:

    PHP Warning:  require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() D:\sites\lara\artisan:0
PHP   2. require() D:\sites\lara\artisan:16
PHP Fatal error:  require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\bootstrap\autoload.php on line 17
PHP Stack trace:
PHP   1. {main}() D:\sites\lara\artisan:0
PHP   2. require() D:\sites\lara\artisan:16

Warning: require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\bootstrap\autoload.php on line 17

Call Stack:
    0.0002     231464   1. {main}() D:\sites\lara\artisan:0
    0.0005     236592   2. require('D:\sites\lara\bootstrap\autoload.php') D:\sites\lara\artisan:16


Fatal error: require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\bootstrap\autoload.php on line 17

Call Stack:
    0.0002     231464   1. {main}() D:\sites\lara\artisan:0
    0.0005     236592   2. require('D:\sites\lara\bootstrap\autoload.php') D:\sites\lara\artisan:16

Script php artisan clear-compiled handling the pre-update-cmd event returned with an error



  [RuntimeException]
  Error Output: PHP Warning:  require(D:\sites\lara\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\sites\lara\boo
  tstrap\autoload.php on line 17
  PHP Stack trace:
  PHP   1. {main}() D:\sites\lara\artisan:0
  PHP   2. require() D:\sites\lara\artisan:16
  PHP Fatal error:  require(): Failed opening required 'D:\sites\lara\bootstrap/../vendor/autoload.php' (include_path='.;C:\php\pear') in D:\sites\lara\boot
  strap\autoload.php on line 17
  PHP Stack trace:
  PHP   1. {main}() D:\sites\lara\artisan:0
  PHP   2. require() D:\sites\lara\artisan:16




update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose]
[-o|--optimize-autoloader] [packages1] ... [packagesN]

如果我尝试输入 composer create-project laravel/laravel

我有

Installing laravel/laravel (v4.0.0)
  - Installing laravel/laravel (v4.0.0)
    Downloading: 100%
    Downloading: 100%
    Downloading: 100%



  [Composer\Downloader\TransportException]
  The "http://nodeload.github.com/laravel/laravel/zip/v4.0.0" file could not be downloaded: failed to open stream: Unable to find the socket transport "ssl"
   - did you forget to enable it when you configured PHP?



create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [package] [directory] [version]

感谢您的帮助

4

2 回答 2

1

杰森刘易斯是对的。只需在您的 php.ini 中注释掉 openssl 扩展名,在 cmd 中再次运行该命令即可解决您的问题。无需重新启动您的 PC 或服务器。

于 2013-06-07T02:20:02.807 回答
0

你不应该打电话update。你应该先打电话install

至于create-project方法,我也有同样的问题。但它消失了。

尝试安装时,请充分查阅文档。

于 2013-06-06T20:48:48.090 回答