Install curl utility on solaris


April 19th, 2011

Firstly, download curl package from sunfreeware.com. unzip the tarball, and execute ./configure
# ./configure
checking whether to enable maintainer-specific portions of Makefiles... no
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 c-ares for DNS lookups... no
checking for sed... /usr/bin/sed
checking for grep... /usr/bin/grep
checking for egrep... /usr/bin/egrep
checking for ar... /usr/local/bin/ar
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... configure: error: newly created file is older than distributed files!
Check your system clock

This was because the system time was off and the timestamps in the source code were in the future.  To fix this all you can do is copy the files to another directory using the copy command:

#cp -r curl-7.21.4 /

Then try to compile again.

After this,  make and make install. If you come across the problem:

configure: error: ar not found in PATH. Cannot continue without ar.

That's because you haven't installed GNU_Binutils on your solaris system.

You should download binutils package from sunfreeware.com and install it:

#gzip -d binutils-2.21-sol10-x86-local.gz
#pkg-add -d binutils-2.21-sol10-x86-local

After this step, if you still receive alert:
configure: error: no acceptable C compiler found in $PATH

If you have installed gcc(we can check using find / -name gcc), then it's the problem of PATH environment variable:
#export PATH=$PATH:/usr/sfw/bin  #you can of course make the variable permanently changed via edit /etc/profile
Then,

#make
#make install
Finished!

Let's have a test of curl:
# which curl
/usr/local/bin/curl

# curl -I -L www.doxer.org
HTTP/1.1 200 OK
Date: Mon, 18 Apr 2011 01:36:14 GMT
Server: Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
X-Powered-By: PHP/5.2.9
X-Pingback: http://www.doxer.org/xmlrpc.php
Content-Type: text/html; charset=UTF-8
Connection: Keep-Alive

Good Luck! 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值