ubuntu - GuzzleHttp\Exception\ConnectException : cURL error 6: Could not resolve host

标签 ubuntu curl libcurl vagrant-windows

我的网站遇到了这个问题。我花了 2 天的时间,但没有成功。

数据库日志中的错误

GuzzleHttp\Exception\ConnectException: cURL error 6: Could not resolve host: www-dev.drupalsite.com (see http://curl.haxx.se/libcurl/c/libcurl-errors.html ) in GuzzleHttp\Handler\CurlFactory::createRejection() (line 186 of /var/www/html/site-d8/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php ).

访问网站时出错

The website encountered an unexpected error. Please try again later.

请注意,这是在 ubuntu(VM Virtual Box)上使用 vagrant 的本地开发站点

最佳答案

最后,我通过在 Ubuntu /etc/hosts 文件中添加主机名解决了该问题。

关于ubuntu - GuzzleHttp\Exception\ConnectException : cURL error 6: Could not resolve host,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48465913/

相关文章:

Ubuntu 12.10 将虚拟主机从一台服务器复制到另一台服务器

javascript - 将我的 Curl 变成 NodeJS

curl - telnet 后关闭 curl 连接

php - 无法限制 PHP 的 cURL 函数的下载大小

Python、Ubuntu : Raise an event when Dropbox is done Syncing?

ubuntu - 有没有办法使用我当前的 SSH 连接进行 SCP 传输?

Ruby gem curb 不会安装在 Windows 7 上,即使我使用 libcurl

尝试将读取的数据写入文件时出现 curl 写入错误

json - curl 到 libcurl http put json 格式的请求

ubuntu - 如何在ubuntu中打开dll和exe文件