centos 手动安装libcurl4-openssl-dev库

下载源代码

curl downloadshttps://curl.se/download/

选择需要下载的版本,我下载的是8.11.0

解压

复制代码
tar -zxvf curl-8.11.0

查看安装命令

查找INSTALL.md,一般在docs文件夹下

--prefix= :指定安装路径(默认安装在/usr/local)

--host= : 可以指定交叉编译工具(如果不需要交叉编译就不用指定)

--with-ssl:这个参数会使./configure在安装的时候依赖openssl,如果openssl安装在默认路径则(/usr/local/ssl)直接使用"--with-ssl"这个参数,如果安装在其他路径,则需要指定ssl的路径。如"--with-ssl=/xxx/xxx"

配置编译选项

复制代码
./configure --with-ssl=/usr/include/openssl

问题:

如果报错如下

复制代码
configure: error: /usr/include/openssl is a bad --with-openssl prefix

修改命令执行

复制代码
./configure --with-openssl=/usr

如果提示,无法检测Openssl,说明我们没有安装Openssl

如果,代表缺少libpsl

安装

下载

https://www.linuxfromscratch.org/blfs/view/svn/basicnet/libpsl.html

解压

配置构建

复制代码
./configure --prefix=/usr --with-ssl

编译

复制代码
make
sudo make install

更新动态链接库缓存:

安装完成后,运行ldconfig更新系统的动态链接库缓存:

复制代码
sudo ldconfig

ldconfig -p | grep libpsl

编译和安装

复制代码
make

sudo make install

检查是否成功

复制代码
ldconfig -p | grep libcurl
相关推荐
苏宸啊1 小时前
Linux权限
linux·运维·服务器
Gofarlic_oms11 小时前
Windchill用户登录与模块访问失败问题排查与许可证诊断
大数据·运维·网络·数据库·人工智能
xqhoj2 小时前
Linux——make、makefile
linux·运维·服务器
文亭湖畔程序猿2 小时前
Debian 12 日常命令 & nano 快捷键速查表
运维·debian
张童瑶2 小时前
Linux 在线安装编译Python3.11
linux·运维·python3.11
ziqibit2 小时前
debian Live with Persistence 持久化U盘的debian系统
运维·debian
Shi_haoliu2 小时前
SolidTime 在 Rocky Linux 9.5 上的完整部署流程
linux·运维·nginx·postgresql·vue·php·laravel
Lkygo2 小时前
LlamaIndex使用指南
linux·开发语言·python·llama
qq_254617773 小时前
nslookup 这个命令解析dns,和系统接口gethostbyname解析区别在哪?
linux·网络
HIT_Weston3 小时前
100、【Ubuntu】【Hugo】搭建私人博客:元信息&翻译(一)
linux·运维·ubuntu