无法安装Laravel4

时间:2013-06-06 19:52:02

标签: laravel laravel-4

我尝试在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]

Thanx求助

2 个答案:

答案 0 :(得分:1)

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

答案 1 :(得分:0)

您不应该致电update。您应该先致电install

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

尝试安装时请完整查阅文档。