curl添加https服务

CURL支持的通信协议有FTP、FTPS、HTTP、HTTPS、TFTP、SFTP、Gopher、SCP、Telnet、DICT、FILE、LDAP、LDAPS、IMAP、POP3、SMTP和RTSP。

首选删除系统自带的openssl,因为他只有可执行程序和库,没有头文件。
sudo apt-get remove openssl
openssl官网,笔者使用版本3.2.0
https://www.openssl.org/source/

./config --prefix=/usr/local/openssl
make
sudo make install

首选删除系统自带的curl,因为他只有可执行程序和库,没有头文件。
sudo apt-get remove curl
curl官网,笔者安装为7.85.0版本
https://curl.se/download/
./configure --with-ssl=/usr/local/openssl //./configure --without-ssl
make
sudo make install
sudo rm /usr/local/lib/curl
系统也有curl库,为防止冲突,删去编译好的curl库,只用它的头文件。

猜你喜欢

转载自blog.csdn.net/weixin_43466192/article/details/134598935
今日推荐