Laravel Composer安装未定义的索引哈希

I tried doing a composer install then this is the response:

Warning: This development build of composer is over 60 days old. It is recommended to update it by running "/usr/local/bin/composer self-update" to get the latest version. Loading composer repositories with package information Installing dependencies (including require-dev) from lock file

[ErrorException] Undefined index: hash

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-plugins] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [--ignore-platform-reqs] [packages1] ... [packagesN]

Any ideas why this is happening?

Thanks.

I think there's something wrong with your composer there's a warning above that says your composer is not updated, try running this command composer self-update

try composer update I ever got the problem like this and then, I do composer update and it solves my problem