繁体   English   中英

如何在以centos7.x为基础的docker镜像中将cURL升级到7.71.0

[英]How to upgrade cURL to 7.71.0 in a docker image with centos7.x as the base

标题很容易解释,当使用yum upgrade curl它不会升级 curl 超过 7.29.0 女巫是一个问题,因为我需要在 docker images 启动脚本中使用--retry-all-errors标志。

运行以下命令解决了我的问题

sudo rpm -Uvh http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
sudo yum install -y yum-utils
sudo yum-config-manager --disable city-fan.org
sudo yum -y --enablerepo=city-fan.org install libcurl libcurl-devel

如果使用 city-fan repo 对您来说是个问题,您也可以使用此脚本直接从 curl 安装。

sudo yum install wget gcc openssl-devel make -y
wget https://curl.haxx.se/download/curl-${VERSION}.tar.gz
tar -xzvf curl-${VERSION}.tar.gz 
rm -f curl-${VERSION}.tar.gz
cd curl-${VERSION}
./configure --prefix=/usr/local --with-ssl
make
sudo make install
sudo ldconfig

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM