LoginSignup
0
1

More than 3 years have passed since last update.

Laravelの初期画面を表示させるまでのエラー解決

Posted at

はじめに

Homestead環境でLaravelのプロジェクトを作成しました。

手順

コマンドで以下を実行すると

composer create-project 〜

下記のエラー

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - phpunit/phpunit[6.0.0, ..., 6.5.14] require php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
    - Root composer.json requires phpunit/phpunit ~6.0 -> satisfiable by phpunit/phpunit[6.0.0, ..., 6.5.14].

phpのバージョンを7.0に変更

コマンド
php70

ブラウザで

failed to open stream: No such file or directory
Failed opening required '/project/vendor/autoload.php' 

のようなエラーが表示

コマンド
composer install

下記のエラー

No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
コマンド
composer update

下記のエラー

Install of kylekatarnls/update-helper failed

  [RuntimeException]                                                                  
  Could not delete /home/vagrant/code/Laravel/vendor/kylekatarnls/update-helper/src:  
コマンド
composer install --no-plugins

ブラウザを確認すると下記のエラー

No application encryption key has been specified.
コマンド
php artisan key:generate

もう一度ブラウザにアクセスするとLaravelの画面が表示!

参考リンク

https://www.84kure.com/blog/2019/09/03/laravel-homestead%E3%81%A7php%E3%81%AE%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E3%82%92%E5%88%87%E3%82%8A%E6%9B%BF%E3%81%88%E3%82%8B/
https://qiita.com/chimayu/items/82d9d457a056829b3b2e
https://qiita.com/hppRC/items/9f09d123f08dc87992f8
https://qiita.com/ponsuke0531/items/197c76fcb9300d7c5f36

0
1
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
1