LoginSignup
0
0

More than 5 years have passed since last update.

laravelインストーラーがエラーで動かなかった。

Last updated at Posted at 2018-06-21

そうだlaravelを使おう

次の現場でlaravel使うようなので、事前にみてみようと思ったら、最新取ろうとしてエラーになりました。

環境:CentOS6, PHP 7.2.7, composer 1.6.5

composerインストール

こちらにしたがってコマンドを実行
https://getcomposer.org/download/

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"
$ which composer
/usr/local/bin/composer

入った!

laravelインストーラーをインストール

プロジェクト作成時につかうっぽいインストーラーを公式ドキュメントにそってインストール!!

composer global require "laravel/installer"
$ which laravel
/usr/local/bin/laravel

入った!!

laravelインストーラーを動かす

$ laravel
PHP Warning:  require(/usr/local/bin/vendor/autoload.php): failed to open stream: No such file or directory in /usr/local/bin/laravel on line 7
PHP Fatal error:  require(): Failed opening required '/usr/local/bin/vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /usr/local/bin/laravel on line 7

エラー!!!

対策

vendor/autoload.php がないから入れたらいいみたいです。

cd /usr/local/bin
composer require "laravel/installer"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0