Curl安装(Linux)

curl

摘要:linux系统上Curl工具的安装,遇到Permission denied与error: no acceptable C compiler found in $PATH两问题;安装之后的测试。

下载

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

解压

tar -vxzf curl-7.53.0.tar.gz 

编译安装

 ./configure
  make
  make install

测试

[hadoop@hadoop01 ~]$ curl --version
curl 7.53.0 (x86_64-pc-linux-gnu) libcurl/7.53.0 OpenSSL/1.0.1e zlib/1.2.3
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets HTTPS-proxy 

问题01

[hadoop@testhdp01 curl-7.53.0]$ make install
Making install in lib
make[1]: Entering directory `/home/hadoop/liangr/curl-7.53.0/lib'
make[2]: Entering directory `/home/hadoop/liangr/curl-7.53.0/lib'
 /bin/mkdir -p '/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c   libcurl.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4.4.0
/usr/bin/install: cannot create regular file `/usr/local/lib/libcurl.so.4.4.0': Permission denied
make[2]: *** [install-libLTLIBRARIES] Error 1
make[2]: Leaving directory `/home/hadoop/liangr/curl-7.53.0/lib'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/hadoop/liangr/curl-7.53.0/lib'
make: *** [install-recursive] Error 1

原因:
这个是权限问题,提示为 Permission denied。
解决:
获取sudo权限来安装,或用root来安装:

[root@testhdp01 curl-7.53.0]# make install

问题02

[hadoop@hadoop01 curl-7.53.0]$ make
./configure
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... yes
checking whether to enable debug build options... no
checking whether to enable compiler optimizer... (assumed) yes
checking whether to enable strict compiler warnings... no
checking whether to enable compiler warnings as errors... no
checking whether to enable curl debug memory tracking... no
checking whether to enable hiding of library internal symbols... yes
checking whether to enable c-ares for DNS lookups... no
checking whether to disable dependency on -lrt... (assumed no)
checking for path separator... :
checking for sed... /bin/sed
checking for grep... /bin/grep
checking for egrep... /bin/grep -E
checking for ar... /usr/bin/ar
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/hadoop/curl-7.53.0':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
make: *** [all] Error 1

error: no acceptable C compiler found in $PATH
没有C编译器;
解决:

[root@hadoop03 ~]# yum install gcc

最后显示

Total                                                                                                                                                                    1.4 MB/s |  15 MB     00:10     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : mpfr-2.4.1-6.el6.x86_64                                                                                                                                                               1/5 
  Installing : cpp-4.4.7-18.el6.x86_64                                                                                                                                                               2/5 
  Installing : ppl-0.10.2-11.el6.x86_64                                                                                                                                                              3/5 
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                                                                                                       4/5 
  Installing : gcc-4.4.7-18.el6.x86_64                                                                                                                                                               5/5 
  Verifying  : gcc-4.4.7-18.el6.x86_64                                                                                                                                                               1/5 
  Verifying  : ppl-0.10.2-11.el6.x86_64                                                                                                                                                              2/5 
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                                                                                                                                                       3/5 
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                                                                                                                                               4/5 
  Verifying  : cpp-4.4.7-18.el6.x86_64                                                                                                                                                               5/5 

Installed:
  gcc.x86_64 0:4.4.7-18.el6                                                                                                                                                                              

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6                      cpp.x86_64 0:4.4.7-18.el6                      mpfr.x86_64 0:2.4.1-6.el6                      ppl.x86_64 0:0.10.2-11.el6                     

Complete!

【作者:happyprince; http://blog.csdn.net/ld326/article/details/78033995

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值