阿里云centos7用composer install出问题
问题描述
阿里云服务器用composer install出问题,
问题出现的平台版本及自己尝试过哪些方法
框架是laravel框架,本地测试是没得问题的,但是服务器上就出问题了
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 51 installs, 0 updates, 0 removals
- Installing ramsey/uuid (3.7.3): Downloading (failed) Failed to download ramsey/uuid from dist: The "https://files.phpcomposer.com/files/ramsey/uuid/44abcdad877d9a46685a3a4d221e3b2c4b87cb76.zip" file could not be downloaded (HTTP/1.1 405 Not Allowed)
Now trying to download from source - Installing ramsey/uuid (3.7.3): Cloning 44abcdad87
- Installing psr/simple-cache (1.0.1): Downloading (failed) Failed to download psr/simple-cache from dist: The "https://files.phpcomposer.com/files/php-fig/simple-cache/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b.zip" file could not be downloaded (HTTP/1.1 405 Not Allowed)
Now trying to download from source - Installing psr/simple-cache (1.0.1): Cloning 408d5eafb8
- Installing psr/container (1.0.0): Downloading (failed) Failed to download psr/container from dist: The "https://files.phpcomposer.com/files/php-fig/container/b7ce3b176482dbbc1245ebf52b181af44c2cf55f.zip" file could not be downloaded (HTTP/1.1 405 Not Allowed)
Now trying to download from source - Installing psr/container (1.0.0): Cloning b7ce3b1764
- Installing symfony/translation (v4.1.1): Downloading (failed) Failed to download symfony/translation from dist: The "https://files.phpcomposer.com/files/symfony/translation/b6d8164085ee0b6debcd1b7a131fd6f63bb04854.zip" file could not be downloaded (HTTP/1.1 405 Not Allowed)
Now trying to download from source - Installing symfony/translation (v4.1.1): Cloning b6d8164085
- Installing nesbot/carbon (1.31.1): Downloading (failed) Failed to download nesbot/carbon from dist: The "https://files.phpcomposer.com/files/briannesbitt/Carbon/385780c8ca2dbfd25452666e3f55e8dc1df58c41.zip" file could not be downloaded (HTTP/1.1 405 Not Allowed)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
提供一下我自己的方案吧。
我本地是可以安装的,虽然也耗费了大量的时间。在阿里云服务器中间会报超时,设置国内镜像也没用,试了不下五六次。
最后,我是把本地的 composer 镜像缓存复制到服务器解压到服务器对应的 composer 缓存目录,然后删除
/vendor
和composer.lock
重新composer install
最后成功了,也很耗时 不确定是运气问题还是真的有作用,实在没办法可以一试。应该是镜像问题,https://pkg.phpcomposer.com/...
同样的问题,本地也遇到了,时好时坏,不知道楼上的老兄怎么解决的!
删除vendor文件夹和composer.lock,重新composer install即可
直接用composer update