1

I'm trying to install something on Solaris with the curl, but I get the following message:

curl: not found

How can I install curl on Solaris?

cshin9
  • 1,440
  • 5
  • 20
  • 33
  • By the way, this should have been asked in unix.stackexchange.com or superuser.com. Might been moved out there. – jlliagre Mar 30 '16 at 14:15
  • 1
    Specifying which version of Solaris is very useful when asking questions like this, as the package system in Solaris 11 and later is very different than the one in Solaris 10 & older, so the answers will be massively different for each. – alanc Mar 30 '16 at 16:43

2 Answers2

3

For Solaris 10, if you have Sun Explorer then you have curl:

On SPARC:

    /opt/SUNWexplo/bin/solaris/curl.sparc

On x86:

    /opt/SUNWexplo/bin/solaris/curl.i386
Krimo
  • 31
  • 1
2

curl is part of a Solaris 11 standard installation:

$ cat /etc/release
                             Oracle Solaris 11.3 X86
  Copyright (c) 1983, 2015, Oracle and/or its affiliates.  All rights reserved.
                            Assembled 06 October 2015
$ type curl
curl is /usr/bin/curl
$ pkg search -l -p /usr/bin/curl
PACKAGE                               PUBLISHER
pkg:/web/curl@7.40.0-0.175.3.0.0.30.0

If you still use Solaris 10, you might get precompiled curl packages, for example SFWcurl from the Solaris Companion CD if you have it, or from OpenCSW, or build your own from source.

$ pkginfo -l SFWcurl
   PKGINST:  SFWcurl
      NAME:  curl - tool for transfering data specified with URL syntax
  CATEGORY:  system
      ARCH:  sparc
   VERSION:  7.19.5,REV=2009.08.23.06.12
   BASEDIR:  /opt
    VENDOR:  curl and libcurl
      DESC:  curl - tool for transfering data specified with URL syntax
    PSTAMP:  freeware20090825021108
  INSTDATE:  Mar 15 2010 11:05
   HOTLINE:  Please contact the owners of this software
    STATUS:  completely installed
     FILES:       75 installed pathnames
                   8 directories
                   3 executables
                2537 blocks used (approx)

Alternatively, depending on your use case, you might simply use wget which has similar features:

$ cat /etc/release
                    Oracle Solaris 10 8/11 s10x_u10wos_17b X86
  Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
                            Assembled 23 August 2011
$ type wget
wget is /usr/sfw/bin/wget
$ pkgchk -lp /usr/sfw/bin/wget
Pathname: /usr/sfw/bin/wget
Type: regular file
Expected mode: 0555
Expected owner: root
Expected group: bin
Expected file size (bytes): 311832
Expected sum(1) of contents: 38400
Expected last modification: Mar 23 17:29:39 2011
Referenced by the following packages:
        SUNWwgetu
Current status: installed
jlliagre
  • 29,783
  • 6
  • 61
  • 72