![由于某种原因,在 *nix 命令行中使用 curl -s 不起作用](https://linux22.com/image/601473/%E7%94%B1%E4%BA%8E%E6%9F%90%E7%A7%8D%E5%8E%9F%E5%9B%A0%EF%BC%8C%E5%9C%A8%20*nix%20%E5%91%BD%E4%BB%A4%E8%A1%8C%E4%B8%AD%E4%BD%BF%E7%94%A8%20curl%20-s%20%E4%B8%8D%E8%B5%B7%E4%BD%9C%E7%94%A8.png)
我正在尝试在我的 MediaTemple DV 机器上安装 Composer(虽然说实话我真的不知道它是如何工作的,而且文档似乎很差)。我正在使用他们的指示
尝试使用以下方法进行全局安装:
$ curl -s https://getcomposer.org/installer | php
我的命令行(再次使用 putty 并以 root 身份登录到我的服务器)思考了一秒钟,然后设置下一个提示。我运行了一个简单的 ls -l 来检查它应该下载的文件,但没有成功。
知道是什么原因导致此问题吗?我已经测试过并且确实安装了 curl。
更新 1
根据第一个答案,详细的答复是:
$ curl -vs https://getcomposer.org/installer | php
* About to connect() to getcomposer.org port 443
* Trying 37.59.4.156... connected
* Connected to getcomposer.org (37.59.4.156) port 443
* successfully set certificate verify locations:
* CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none
* SSLv2, Client hello (1): SSLv3, TLS handshake, Server hello (2): SSLv3, TLS handshake, CERT (11): SSLv3, TLS handshake, Server key exchange (12): SSLv3, TLS handshake, Server finished (14): SSLv3, TLS handshake, Client key exchange (16): SSLv3, TLS change cipher, Client hello (1): SSLv3, TLS handshake, Finished (20): SSLv3, TLS change cipher, Client hello (1): SSLv3, TLS handshake, Finished (20): SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: /C=CH/CN=dl.packagist.org/[email protected]
* start date: 2012-07-07 23:25:35 GMT
* expire date: 2013-07-10 02:55:12 GMT
* SSL: certificate subject name 'dl.packagist.org' does not match target host name 'getcomposer.org'
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
答案1
尝试以详细模式(-v)执行 curl:
curl -vs https://getcomposer.org/installer | php