1. 程式人生 > >ubuntu 編譯安裝curl

ubuntu 編譯安裝curl

https://www.cnblogs.com/suidouya/p/7387861.html

親測ubuntu16.04安裝成功。

 

步驟

1)下載curl包(可以在這個網站上找最新的版本 http://curl.haxx.se/download/

wget https://curl.haxx.se/download/curl-7.55.1.tar.gz

2)解壓

tar -xzvf  curl-7.55.1.tar.gz

3)覆蓋安裝

1 cd curl-7.55.1
2 ./configure
3 make
4 make install

4)使用 curl --version 檢查是否更新成功

 

根據這個步驟安裝過程中,如出現錯誤,如下,是因為許可權問題,使用sudo make install即可。

Making install in lib
make[1]: Entering directory '/home/qiao/install/curl-7.61.1/lib'
make[2]: Entering directory '/home/qiao/install/curl-7.61.1/lib'
 /bin/mkdir -p '/usr/local/lib'
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libcurl.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libcurl.so.4.5.0 /usr/local/lib/libcurl.so.4.5.0
/usr/bin/install: cannot create regular file '/usr/local/lib/libcurl.so.4.5.0': Permission denied
Makefile:1068: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory '/home/qiao/install/curl-7.61.1/lib'
Makefile:3523: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/qiao/install/curl-7.61.1/lib'
Makefile:927: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1