阿里云centos7用composer install出问题

发布于 2022-09-07 22:55:40 字数 2179 浏览 22 评论 0

问题描述

阿里云服务器用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

顾忌 2022-09-14 22:55:40

提供一下我自己的方案吧。

我本地是可以安装的,虽然也耗费了大量的时间。在阿里云服务器中间会报超时,设置国内镜像也没用,试了不下五六次。

最后,我是把本地的 composer 镜像缓存复制到服务器解压到服务器对应的 composer 缓存目录,然后删除 /vendorcomposer.lock 重新 composer install 最后成功了,也很耗时 不确定是运气问题还是真的有作用,实在没办法可以一试。

赠意 2022-09-14 22:55:40

应该是镜像问题,https://pkg.phpcomposer.com/...

狼性发作 2022-09-14 22:55:40

同样的问题,本地也遇到了,时好时坏,不知道楼上的老兄怎么解决的!

强辩 2022-09-14 22:55:40

删除vendor文件夹和composer.lock,重新composer install即可

怀念你的温柔 2022-09-14 22:55:40

直接用composer update

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文