关于linux:LinuxCentOS7中升级Curl

1次阅读

共计 768 个字符,预计需要花费 2 分钟才能阅读完成。

在装置 Homebrew 时,提醒 curl 版本过低,无奈装置。
应用 yum update 也无奈降级 curl,通过查找材料决定应用第三方。

1. 首先装置 epel-release(其余找不到的 rpm 包也能够去下载)

yum -y install epel-release 

2. 装置 curl 的 rpm 包

wget http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/city-fan.org-release-2-2.rhel7.noarch.rpm
rpm -ivh city-fan.org-release-2-2.rhel7.noarch.rpm

3. 将 [city-fan.org] 的 enable 值批改为 1

vim /etc/yum.repos.d/city-fan.org.repo
[city-fan.org]
name=city-fan.org repository for Red Hat Enterprise Linux (and clones) $releasever ($basearch)
#baseurl=http://mirror.city-fan.org/ftp/contrib/yum-repo/rhel$releasever/$basearch
mirrorlist=http://mirror.city-fan.org/ftp/contrib/yum-repo/mirrorlist-rhel$releasever
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-city-fan.org

4. 更新 curl

yum update curl --enablerepo=city-fan.org -y

5. 装置实现,查看版本

curl --version
正文完
 0