composer install 报错

mac2024-06-06  49

在我们实际开发过程中使用composer install,有时候会报:Warning: The lock file is not up to date with the latest changes in composer.json, you may be getting outdated dependencies, run update to update them.

这个报错的意思是你的composer.json和composer.lock的文件md5sum值有差异,也就是不同步。

解决方法1: 使用 composer update nothing Loading composer repositories with package information Updating dependencies Nothing to install or update Writing lock file Generating autoload files 这个命令不会改变任何库,但是会更新composer.lock文件。

解决方法2: 如果你的composer版本比较高,可以直接使用 composer update --lock 可以达到相同的效果。

最新回复(0)