在Digital Ocean上更新Composer时出现连接超时错误

唐卡纳什

我可以掉进小滴中。也能够进行更新和升级。

当我尝试运行sudo composer自我更新或composer更新时,出现连接超时错误。

The "https://getcomposer.org/versions" file could not be downloaded: failed to open stream: Connection timed out  

输出 ufw status

To      Action    From
22      ALLOW     Anywhere
80      ALLOW     Anywhere
443     ALLOW     Anywhere
25      ALLOW     Anywhere
10000   ALLOW     Anywhere     

输出 composer diagnose

Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file    could not be downloaded: failed to open stream: Connection timed out
Checking https connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file    could not be downloaded: failed to open stream: Connection timed out
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: 

[Composer\Downloader\TransportException]                                     
The "https://getcomposer.org/version" file could not be downloaded: failed   
to open stream: Connection timed out

输出 composer --version

Composer version 1.0-dev (9e9c1917e1ed9f3f78b195a785aee3c6dc3cb883) 2015-11-23 10:31:23  

输出 curl IL http://packagist.org/packages.json

HTTP/1.1 200 OK
Server: nginx
Date: Sun, 10 Dec 2017 08:40:20 GMT
Content-Type: application/json
Content-Length: 1302
Last-Modified: Sun, 10 Dec 2017 08:38:28 GMT
Connection: keep-alive
ETag: "5a2cf284-516"
Cache-Control: private, max-age=0, no-cache
Accept-Ranges: bytes  

我尝试手动获取最新作曲家的副本,但它也无法正常工作

输出 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

PHP Warning:  copy(https://getcomposer.org/installer): failed to open stream: Connection timed out in Command line code on line 1  

可能是什么原因?大约一个星期前,我一直在工作。我可以访问(浏览)Droplet上托管的网页。也能够进行更新和升级。

尼科·海瑟(Nico Haase)

https://getcomposer.org/doc/articles/troubleshooting.md#operation-timed-out-ipv6-issues-可以解决您的问题。如果composer update之后速度很慢,请尝试使用更新的PHP版本运行它。使用PHP 7而不是PHP 5运行它将大大提高速度

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Packer Digital Ocean FIPS模式无法ssh

如何保护Digital Ocean Elasticsearch集群?

在Digital Ocean的Ubuntu 14.04上使用Ansible设置Mesos

Digital Ocean的CPU的规格是什么

使用axios通过签名链接将图像放置在Digital Ocean空间中时出现“ SignatureDoesNotMatch”

Django在Digital Ocean上

通过Codeship部署到Digital Ocean时,出现v8-compile-cache-0目录

Digital Ocean Server中的Crontab调度

运行Scrapoxy和Digital Ocean时出现问题

在Dokku上部署Rails时出错-在Digital Ocean上

在Digital Ocean上的pm2启动多个Nuxtjs项目

在Digital Ocean上升级GitLab时没有登录页面

通过终端错误在Digital Ocean Ubuntu中更新Composer

Digital Ocean / Nginx / MySQL / MVC部署

尝试通过Gitlab CI / CD部署到Digital Ocean时出现SSH错误

无法更新Ubuntu Server的主机名输出(在Digital Ocean上)

PHPMailer使用Nginx在我的Digital Ocean服务器上导致504超时错误

安装Ghost博客时遇到问题-Digital Ocean

SSH时访问Digital Ocean服务器会给出错误消息

在Digital Ocean上使用Terraform进行Google TXT记录验证

MongoDB在Digital Ocean上托管

Digital Ocean Git裸回购

Digital Ocean 主机上的 phpMyAdmin 404 错误

我在 Digital Ocean 上有错误安全的 apache?

Digital Ocean - 18.04 Ubuntu 服务器设置错误

在 Digital Ocean 液滴上安装 DirectAdmin 时出错

尝试在 Digital Ocean 中更新 Hasura 时出错

无法在 kubernetes 集群 (Digital Ocean) ErrImagePull 上运行 Pod

Digital Ocean Kubernetes 机密证书与托管数据库连接