How to install GNU tar in Sun Solaris

There are scenarios where you cannot untar a certain package with the builtin tar utility. A best example would be when you use it to untar the MySQL Packages downloaded from

http://dev.mysql.com/downloads/mysql/5.0.html

Follow the procedures listed below to sucessfully install GNU Tar installed in Sun Solaris.

Download the GNU tar (tar-1.15.1) for your Solaris version and platform (SPARC/X86) from,

http://www.sunfreeware.com

Once downloaded, change to the directory where the file is downloaded (ex: /export/software/)

# cd /export/software

Now, unzip using,

# gzip -d tar-1.15.1-sol8-sparc-local.gz

NOTE: File Name varies as per your solaris version/platform

Once done, install the package using,

# pkgadd -d tar-1.15.1-sol9-sparc-local

NOTE: Be sure that you change to the directory and and just enter the package name after -d

Answer the prompts for confirmation and creation of new folder (if required).

This completes the installation.

To check the installation,

# pkginfo | grep tar

This will show up as

application SMCtar GNU tar..

To confirm with more details,

#pkginfo -l SMCtar

This should do. 

6 thoughts on “How to install GNU tar in Sun Solaris”

  1. I’ve succesfully installed the package with this how-to.
    But how can i now use the new tar application?
    When i type in ‘tar’ i still use the old one.

  2. If you’re ssh’d into the box, make sure you quit your ssh session and log back in. That should fix the issue if your terminal is using the old tar.

    It worked for me.

  3. I have install below GNU tar

    “SUNWgtar gtar – GNU tar”

    I question is how to use GNU tar(procedure) for untar the tomcat on soalris.

    Pls give the solution for it.

  4. Since you will have the system bin directories previously in your PATH, just use the full path:

    # /usr/local/bin/tar xf FILE_TO_UNTAR

  5. which environment variable I need to set so that applications know that this lib installed.

    Thanks

Leave a Comment

Your email address will not be published. Required fields are marked *