我在我的Ubuntu 16.04服务器上安装了SSL证书,从那以后编写器已停止正常工作。
通过浏览器访问网站时,证书可以正常工作。但是,在运行sudo composer update
时,我收到以下警告:
" https://packagist.org/packages.json"无法下载文件:
php_network_getaddresses: getaddrinfo
失败:名称解析暂时失败 无法打开流:php_network_getaddresses
:getaddrinfo
失败:名称解析暂时失败 https://packagist.org无法完全加载,包信息是从本地缓存加载的,可能已过期
然后出现以下错误:
Updating dependencies (including `require-dev`)
- Updating soundasleep/html2text (0.2.2 => 0.3.4)
Checking out a1f77b8f340c8425b746bef1d1040189e89be334
Update failed (Failed to clone https://github.com/soundasleep/html2text.git via https, ssh protocols, aborting.
>
- https://github.com/soundasleep/html2text.git
fatal: unable to access 'https://github.com/soundasleep/html2text.git/': Could not resolve host: github.com
>
- git@github.com:soundasleep/html2text.git
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
>
Please make sure you have the correct access rights
and the repository exists.
)
`Would you like to try reinstalling the package instead [yes]?`
如果我尝试重新安装它,它将返回以下内容:
- Removing soundasleep/html2text (0.2.2)
- Installing soundasleep/html2text (0.3.4)
Cloning a1f77b8f340c8425b746bef1d1040189e89be334
Failed to download soundasleep/html2text from source: Failed to clone https://github.com/soundasleep/html2text.git via https, ssh protocols, aborting.
- https://github.com/soundasleep/html2text.git
Cloning into '/path/to/dir/vendor/soundasleep/html2text'...
fatal: unable to access 'https://github.com/soundasleep/html2text.git/': Could not resolve host: github.com
- git@github.com:soundasleep/html2text.git
Cloning into '/path/to/dir/vendor/soundasleep/html2text'...
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Now trying to download from dist
- Installing soundasleep/html2text (0.3.4)
Downloading: 100%
Downloading: 100%
Downloading: 100%
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/soundasleep/html2text/zipball/a1f77b8f340
c8425b746bef1d1040189e89be334" file could not be downloaded: php_network_ge
taddresses: getaddrinfo failed: Temporary failure in name resolution
failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
sudo composer diagnose
会返回此信息:
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded: `php_network_getaddresses: getaddrinfo failed`: Temporary failure in name resolution
failed to open stream: `php_network_getaddresses: getaddrinfo` failed: Temporary failure in name resolution
Checking https connectivity to packagist: FAIL
我已尝试export http_proxy=myexternalip:80
和export https_proxy=myexternalip:443
(以及HTTP_PROXY
和HTTPS_PROXY
,但没有运气。