【问题标题】:curl can't connect to only certain HTTPS hostscurl 无法仅连接到某些 HTTPS 主机
【发布时间】:2014-01-25 05:39:36
【问题描述】:

我正在尝试在使用 Vagrant 创建的 VM (Ubuntu 12.04) 上安装 Meteor.js。

安装应该很简单:
curl https://install.meteor.com | /bin/sh

但是这失败了
curl: (7) couldn't connect to host

我已将该 shell 脚本中的请求失败隔离到此 URL:
https://warehouse.meteor.com/bootstrap/0.7.0.1/meteor-bootstrap-Linux_i686.tar.gz

当我将其更改为使用 HTTP 而不是 HTTPS 时,它可以工作。但是,我在其他地方遇到了问题,需要从 httpS://warehouse.meteor.com/... 中提取内容。

我认为问题出在 https,但如果我这样做了:
curl https://google.com

我得到的页面没有问题,那么可能是什么问题?

【问题讨论】:

  • 说主机为我工作。但是,如果您使用 --verbose 选项运行 curl 会发生什么,将会很有趣。
  • Downloading Meteor distribution + tar -xzf - -C /home/pihentagy/.meteor-install-tmp -o + curl -v --progress-bar --fail https://d3sqy0vbqsdhku.cloudfront.net/packages-bootstrap/1.0.3.2/meteor-bootstrap-os.linux.x86_64.tar.gz * Hostname was NOT found in DNS cache * Could not resolve host: d3sqy0vbqsdhku.cloudfront.net * Closing connection 0 curl: (6) Could not resolve host: d3sqy0vbqsdhku.cloudfront.net gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now + echo Installation failed. Installation failed.

标签: http curl https meteor vagrant


【解决方案1】:

Per another Ubuntu/Meteor question,当您:

sudo apt-get update && sudo apt-get upgrade

【讨论】:

    【解决方案2】:

    对我来说,升级并没有解决问题。

    我的解决方案是从 install.meteor.com 下载脚本并将 TARBALL_URL 从 https 替换为 http,然后我手动运行脚本。

    【讨论】:

      猜你喜欢
      • 2013-07-31
      • 1970-01-01
      • 1970-01-01
      • 2010-11-23
      • 1970-01-01
      • 1970-01-01
      • 2016-12-01
      • 1970-01-01
      相关资源
      最近更新 更多