您的位置:首页 > 财经 > 产业 > 海南网络推广评估_学校管理系统_百度开发平台_备案域名查询

海南网络推广评估_学校管理系统_百度开发平台_备案域名查询

2025/3/25 23:52:16 来源:https://blog.csdn.net/weixin_44534057/article/details/146365513  浏览:    关键词:海南网络推广评估_学校管理系统_百度开发平台_备案域名查询
海南网络推广评估_学校管理系统_百度开发平台_备案域名查询

Centos编译升级libcurl

  • ‌下载最新版源码包
  • 安装编译依赖
  • 配置编译选项
    • 如果报错:
      • 通过 EPEL 仓库安装
      • 手动源码编译安装
    • 如果报错:
      • 安装Brotli 开发库
    • 如果报错:
      • 方法一:安装 libpsl-devel 依赖
        • 通过 EPEL 仓库安装
        • 重新运行 configure
      • 方法二:禁用 PSL 支持
  • ‌编译并安装
  • 替换系统旧版本

‌下载最新版源码包

访问curl官网获取最新版本(如8.12.1):

wget https://curl.se/download/curl-8.12.1.tar.gz
tar -zxvf curl-8.12.1.tar.gz && cd curl-8.12.1

安装编译依赖

yum groupinstall 'Development Tools' -y
yum install openssl-devel libnghttp2-devel -y

配置编译选项

./configure --prefix=/usr/local/curl --with-brotli --with-openssl

若需禁用特定功能(如LDAP),可添加–disable-ldap等参数‌

如果报错:

configure: error: libpsl libs and/or directories were not found where specified!

通过 EPEL 仓库安装

# 安装 EPEL 仓库
yum install epel-release -y# 更新仓库缓存
yum clean all && yum makecache# 安装 libpsl-devel
yum install libpsl-devel -y

手动源码编译安装

# 安装编译依赖
yum install wget gcc make pkg-config -y# 下载 libpsl 源码
wget https://github.com/rockdaboot/libpsl/releases/download/0.21.5/libpsl-0.21.5.tar.gz
# 解压并编译
tar -zxvf libpsl-0.21.5.tar.gz
cd libpsl-0.21.5
./configure
make
sudo make install# 更新动态库缓存
sudo ldconfig

如果报错:

configure: error: BROTLI libs and/or directories were not found where specified!

安装Brotli 开发库

yum install brotli-devel -y

如果报错:

configure: error: libpsl libs and/or directories were not found where specified!

方法一:安装 libpsl-devel 依赖

通过 EPEL 仓库安装
# 确保已启用 EPEL 仓库
yum install epel-release -y# 安装 libpsl-devel
yum install libpsl-devel -y
重新运行 configure
./configure --prefix=/usr/local/curl --with-brotli --with-openssl

方法二:禁用 PSL 支持

如果不需要 ‌Public Suffix List‌ 功能(例如域名后缀解析),可在配置时直接禁用:

./configure --prefix=/usr/local/curl --with-brotli --with-openssl

‌编译并安装

make && make install

替换系统旧版本

mv /usr/bin/curl /usr/bin/curl.bak  # 备份旧版本
cp /usr/local/curl/bin/curl /usr/bin/curl
echo "/usr/local/curl/lib" > /etc/ld.so.conf.d/curl.conf
ldconfig  # 更新动态库缓存

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com