Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to install laravel 4 using composer on ubuntu

ubuntu@ip-10-252-31-19:/$ sudo curl -sS https://getcomposer.org/installer | sudo php
ubuntu@ip-10-252-31-19:/$ sudo mv composer.phar /usr/local/bin/composer
ubuntu@ip-10-252-31-19:/$ cd /home/user
ubuntu@ip-10-252-31-19:/home/user$ sudo wget https://github.com/laravel/laravel/archive/master.zip
ubuntu@ip-10-252-31-19:/home/user$ unzip master.zip
ubuntu@ip-10-252-31-19:/home/user$ cd laravel-master
ubuntu@ip-10-252-31-19:/home/user/laravel-master$ sudo composer install
Loading composer repositories with package information
Installing dependencies (including require-dev)
ubuntu@ip-10-252-31-19:/home/user/laravel-master$ sudo composer update
PHP Warning:  require(/home/user/laravel-master/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/user/laravel-master/bootstrap/autoload.php on line 17
PHP Fatal error:  require(): Failed opening required '/home/user/laravel-master/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/user/laravel-master/bootstrap/autoload.php on line 17
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Warning:  require(/home/user/laravel-master/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/user/laravel-master/bootstrap/autoload.php on line 17
PHP Fatal error:  require(): Failed opening required '/home/user/laravel-master/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/user/laravel-master/bootstrap/autoload.php on line 17
ubuntu@ip-10-252-31-19:/home/user/laravel-master$ sudo composer dump-autoload -o
Generating autoload files
ubuntu@ip-10-252-31-19:/home/user/laravel-master$ sudo composer update
PHP Fatal error:  Class 'Patchwork\Utf8\Bootup' not found in /home/user/laravel-master/bootstrap/autoload.php on line 46
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error:  Class 'Patchwork\Utf8\Bootup' not found in
/home/user/laravel-master/bootstrap/autoload.php on line 46

I've spent quite a lot of time playing around and couldn't find any documentation on this problem, I will be honest and say I don't know enough about composer to solve it.

EDIT

I tried the following which was suggested in the answers, without any luck.

ubuntu@ip-10-252-31-19:/home/user$ sudo composer create-project laravel/laravel master
Installing laravel/laravel (v4.0.0)
  - Installing laravel/laravel (v4.0.0)
    Loading from cache
Created project in laravel
Loading composer repositories with package information
Installing dependencies (including require-dev)
ubuntu@ip-10-252-31-19:/home/user$ ls
master
ubuntu@ip-10-252-31-19:/home/user$ cd master
ubuntu@ip-10-252-31-19:/home/user/master$ ls
app  artisan  bootstrap  composer.json  CONTRIBUTING.md  phpunit.xml  public  readme.md  server.php
ubuntu@ip-10-252-31-19:/home/user/master$ sudo composer install --no-scripts
Loading composer repositories with package information
Installing dependencies (including require-dev)
ubuntu@ip-10-252-31-19:/home/user/master$ ls
app  artisan  bootstrap  composer.json  CONTRIBUTING.md  phpunit.xml  public  readme.md  server.php
ubuntu@ip-10-252-31-19:/home/user/master$ sudo composer dump-autoload -o
Generating autoload files
ubuntu@ip-10-252-31-19:/home/user/master$ ls
app  artisan  bootstrap  composer.json  CONTRIBUTING.md  phpunit.xml  public  readme.md  server.php  vendor
ubuntu@ip-10-252-31-19:/home/user/master$ sudo tail /var/log/nginx/error.log
2013/06/06 15:50:56 [error] 20042#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Class 'Patchwork\Utf8\Bootup' not found in /home/user/master/bootstrap/autoload.php on line 46"
 while reading response header from upstream, client: w.x.y.z, server: dom.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "dom.com"
like image 696
Danny Cullen Avatar asked Jun 05 '13 23:06

Danny Cullen


1 Answers

I had the same issue lately. Just run composer with --no-scripts flag.

composer update --no-scripts

like image 153
radmen Avatar answered Nov 03 '22 00:11

radmen