curl的安装中出现的问题

首先一次是在32位的centos上安装的curl:

--prefix=/usr/local/curl --with-ssl=/usr/local/openssl 
编译后报错:error: OpenSSL libs and/or directories were not found where specified

解决:--with-ssl目录要指向openssl的ssl目录
./configure --prefix=/usr/local/curl --with-ssl=/usr/local/openssl/ssl

后来显示ssl、https都支持。

然后在64位centos上安装,

还是和以前一样,安装完毕后发现ssl没有启用,但是编译未报错。

做了一个猜测:貌似某些版本--with-ssl路径指认不同,以下是64位的指认路径。如果路径指认到ssl,configure后ssl不能开启
./configure --prefix=/usr/local/curl --with-ssl=/usr/local/openssl

这样编译未报错,显示ssl启用。但是make的时候报错。

[html]  view plain copy print ?
  1. /usr/bin/ld: warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)  
  2. /usr/bin/ld: warning: libcrypto.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)  
最后发现,安装openssl的时候选择了enable-shared,需要进行如下安装。(参考:http://curl.haxx.se/docs/install.html)
 env LDFLAGS=-R/usr/local/openssl/lib ./configure --prefix=/usr/local/curl --with-ssl=/usr/local/openssl


转载于:https://my.oschina.net/maczhao/blog/348637

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值