CentOS 7 安装 libcurl with openssl

最近项目需要重新编译libcurl 使其支持ssl,在这里进行记录:

下载openssl : curl -O -L https://github.com/openssl/openssl/archive/OpenSSL\_1\_1\_1g.zip

创建安装目录:/opt/openssl 

配置openssl动态库:./config --prefix=/opt/openssl --shared 

编译:make -j 30 && make install 

编译libcurl 

下载curl 源码:https://curl.haxx.se/download.html

我使用的版本:https://curl.haxx.se/download/curl-7.71.1.tar.gz

创建装目录:/opt/libcurl 

编译:./configure --prefix=/opt/libcurl --with-ssl=/opt/openssl/

安装:make -j 30 && make install 

配置LD 环境变量,或者库位置,即可引入到项目中;

保持更新,转载请注明出处;更多内容请关注cnblogs.com/xuyaowen;

评论

暂无评论