centos7アップグレードcurlバージョン

curlの公式ウェブサイト:http//www.city-fan.org/

1.リポジトリをインストールする

rpm -Uvh  http://www.city-fan.org/ftp/contrib/yum-repo/rhel6/x86_64/city-fan.org-release-2-1.rhel6.noarch.rpm

3.リポジトリの有効化を1に変更します

 

vim /etc/yum.repos.d/city-fan-for-curl.repo
[CityFanforCurl]
name=City Fan Repo
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
enabled=0
gpgcheck=0

4.最新のカールをインストールする

yum update curl --enablerepo=CityFanforCurl -y

5.プロンプトがlibnghttp2.so.14()(64ビット)に依存していない場合

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/l/libnghttp2-1.6.0-1.el6.1.x86_64.rpm
然后重复第4步即可

6. curlのバージョンを表示する

# curl -V
curl 7.62.0 (x86_64-redhat-linux-gnu) libcurl/7.62.0 NSS/3.36 zlib/1.2.7 libpsl/0.7.0 (+libicu/50.1.2) libssh2/1.8.0 nghttp2/1.31.1
Release-Date: 2018-10-31
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy PSL Metalink 

またはソースコードのインストール

7.63のソースコードをダウンロード

wget http://curl.haxx.se/download/curl-7.69.1.tar.gz

解凍

tar -xvf curl-7.69.1.tar.gz
cd curl.7.69.1


インストールディレクトリを指定します

./configure --prefix=/usr/local/curl


sudoをコンパイルしてインストールしますmake
sudo make install
 
コマンド環境変数を追加します
export PATH = $ PATH:/ usr / local / curl / bin
 
CまたはC ++呼び出しで使用されるヘッダーファイル
#include <curl / curl.h>
 
 
ヘッダーファイルをシステムディレクトリにコピーします。
sudo cp -R / usr / local / curl / include / curl / usr / includeを追加することもできます

公開された59元の記事 ウォン称賛21 ビュー20000 +

おすすめ

転載: blog.csdn.net/tony_vip/article/details/105202578