【问题标题】:Laravel 4 bootstrap errorLaravel 4 引导错误
【发布时间】:2014-03-26 16:11:11
【问题描述】:

这是我在安装完所有东西后得到的错误:

这些是我安装的步骤。

  1. 已下载 XAMPP
  2. 从root用户打开的命令终端:

     git clone -b develop git://github.com/laravel/laravel.git L4_site
    
  3. 更改目录 cd L4_site
  4. 在根目录下创建composer.json文件或者通过终端安装:

    curl -S getcomposer.org/installer|php -d detect_unicode=off
    

    *参见 chris-schmitz.com/getting-started-with-laravel-4

  5. 在终端输入 L4_site 目录:php composer.phar install

    This is the error I got after installing composer:
    Strikers-MacBook-Pro:L4_site striker$ php composer.phar install
    Loading composer repositories with package information
    Installing dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.
    
  6. 然后点服务器,输入:

    php -S localhost:8888 -t public/
    

完成所有这些后,我将目录复制到我的托管服务器(hostgator)并收到以下错误:

>Warning: require(/home/flemzy/public_html/l/bootstrap/../vendor/autoload.php)     [function.require]: failed to open stream: No such file or directory in /home/flemzy/public_html/l/bootstrap/autoload.php on line 17

>Fatal error: require() [function.require]: Failed opening required '/home/flemzy/public_html/l/bootstrap/../vendor/autoload.php' (include_path='.:/opt/php53/lib/php') in /home/flemzy/public_html/l/bootstrap/autoload.php on line 17

我非常接近获得一个可以工作的 laravel 4 入门应用程序。错误在于未正确安装依赖项。我想我需要一个正确的 composer.json 文件才能解决这些错误。

感谢大家的帮助。

【问题讨论】:

  • HostGator 提供 SSH。您是否尝试过直接在服务器上安装? stackoverflow.com/questions/18281624/….
  • 我将我的目录上传到我的 hostgator 服务器。我有共享服务器托管。

标签: php json laravel composer-php


【解决方案1】:

第4步有错误,你应该这样做:

 curl -S getcomposer.org/installer | php

然后

 php composer.phar install

有关安装 Composer 的详细说明,请参阅 https://getcomposer.org/doc/00-intro.md#locally

【讨论】:

  • 我先做了 curl composer 然后他们 php composer.phar 安装。第 5 步是 php composer.phar 安装
  • 好的,我看到你编辑了这个问题,看来你的 composer.json 无效
  • 在哪里可以获得有效的 composer.json 文件
  • github.com/laravel/laravel/blob/master/composer.json 无论如何,请避免在步骤 1 中使用开发分支和在步骤 4 中使用 -d detect_unicode=off,并按照官方指南进行全新安装:laravel.com/docs/installation
猜你喜欢
  • 2018-02-13
  • 2018-04-14
  • 2016-06-04
  • 1970-01-01
  • 2021-04-23
  • 1970-01-01
  • 2015-06-21
  • 1970-01-01
  • 2015-09-02
相关资源
最近更新 更多