Linux下安装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即可。

wangpan@wangpan-OptiPlex-7050:~/work_record/tool/curl-7.57.0$ make install
Making install in lib
make[1]: Entering directory '/home/wangpan/work_record/tool/curl-7.57.0/lib'
make[2]: Entering directory '/home/wangpan/work_record/tool/curl-7.57.0/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:788: recipe for target 'install-libLTLIBRARIES' failed
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory '/home/wangpan/work_record/tool/curl-7.57.0/lib'
Makefile:3134: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/home/wangpan/work_record/tool/curl-7.57.0/lib'
Makefile:907: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

猜你喜欢

转载自blog.csdn.net/wangpanbaoding/article/details/79104609