Help us understand the problem. What is going on with this article?

Composerでエラーが出たらdiagnoseで診断してみよう

Laravelプロジェクトの開発環境構築をやってて、「composer install」したところ、下記のようなエラーが出たので、解決手段をメモ。

vagrant@homestead:~/code/qlara$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files

  [RuntimeException]
  Could not scan for classes inside "/home/vagrant/code/qlara/vendor/sebastian/object-enumerator/src/" which does not appear to be a file nor a folder

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

エラーの内容からは原因がよくわかりませんね・・・

composer diagnose

composer diagnoseで診断してみます。
composer diagnose.PNG
Checking pubkeysがFAILになってますね。
解決策を提示してくれているので言われた通りに…

composer self-update --update-keys

すると、Public KeyとTags Public Keyを聞かれるので、下記のページからコピペします。
https://composer.github.io/pubkeys.html
※-----も含めテキストエリアの中身を全部コピーします。

その後、再度composer installしたところ、また同じエラーが出たのですが、
vendorディレクトリを一旦削除、キャッシュクリア(composer clear-cache)したらうまくいきました。

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away