无法安装Laravel4

问题描述 投票:1回答:2

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

如果我尝试通过输入作曲家创建项目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]

感谢您的帮助

laravel laravel-4
2个回答
1
投票

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


0
投票

您不应该打电话给update 。 您应该首先致电install

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

尝试安装时,请完全参考文档。

© www.soinside.com 2019 - 2024. All rights reserved.