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