编译openssl
openssl下载地址:https://www.openssl.org/source/index.html
tar zxvf openssl-3.3.0.tar.gz
cd openssl-3.3.0/
./config -fPIC no-shared --prefix=/root/openssl_install --openssldir=/root/openssl_install
make
make install
编译curl
curl下载地址:https://curl.se/download/
tar zxvf curl-8.7.1.tar.gz
cd curl-8.7.1/
./configure --prefix=/root/curl_install --disable-shared --with-ssl=/root/openssl_install
正确配置好之后会显示如上信息
make
make install
至此,curl的头文件和库的文件已在/root/curl_install
目录下生成