curl的安装中出现的问题

来源:互联网 发布:钱夫人淘宝店怎么没了 编辑:程序博客网 时间:2024/05/21 20:55

首先一次是在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的时候报错。

/usr/bin/ld: warning: libssl.so.1.0.0, needed by ../lib/.libs/libcurl.so, not found (try using -rpath or -rpath-link)/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



0 0