我正在尝试在Ubuntu 11.04上安装Rails环境。当我启动命令rvm install 1.9.2——with-openssl-dir=/usr/local时,收到以下错误:
curl : (1) Protocol https not supported or disabled in libcurl
如何解决这个问题?
我正在尝试在Ubuntu 11.04上安装Rails环境。当我启动命令rvm install 1.9.2——with-openssl-dir=/usr/local时,收到以下错误:
curl : (1) Protocol https not supported or disabled in libcurl
如何解决这个问题?
当前回答
用flag -with-darwinssl解决了这个问题
转到带有curl源代码的文件夹
请在这里下载https://curl.haxx.se/download.html
sudo ./configure --with-darwinssl
make
make install
重新启动控制台就完成了!
其他回答
在url中指定协议可能会解决您的问题。
我有一个类似的问题(当使用curl php客户端):
我传递的是domain.com而不是sftp://domain.com,这导致了这个令人困惑的错误:
libcurl中不支持或禁用协议“http”,花费了0秒。
在https网站上使用curl时得到了相同的错误
curl https://api.dis...
正如ganesh指出的,这是因为我的curl版本没有启用SSL。我回去下载了带有SSL的版本,效果很好。
用flag -with-darwinssl解决了这个问题
转到带有curl源代码的文件夹
请在这里下载https://curl.haxx.se/download.html
sudo ./configure --with-darwinssl
make
make install
重新启动控制台就完成了!
我在为ruby安装rvm时遇到了同样的问题。 找到解决方案: 在root的下载文件夹中提取curl (tar)后。
cd /root/Downloads/curl # step-1
./configure --with-ssl # step-2
make # step-3
make install # step-4 (if not root, use sudo before command)
源
我刚刚用指向openssl 1.0.2g库文件夹和包含文件夹的配置选项重新编译了curl,我仍然得到了这条消息。当我对curl执行ldd时,它没有显示它使用libcrypt。或者libssl。所以,所以我假设这一定意味着即使make和make安装成功没有错误,但curl不支持HTTPS ?配置和make如下:
./configure --prefix=/local/scratch/PACKAGES/local --with-ssl=/local/scratch/PACKAGES/local/openssl/openssl-1.0.2g --includedir=/local/scratch/PACKAGES/local/include/openssl/openssl-1.0.2g
make
make test
make install
我应该提到libssl.so。1在/local/scratch/PACKAGES/local/lib目录下。不清楚——with-ssl选项应该指向那里还是指向openssl安装放置openssl.cnf文件的目录。我选择了后者。但是如果它应该是前者,make应该会失败,并出现无法找到库的错误。