Skip to content

Solaris Package Management

March 19, 2013

I needed to install GhostScript on a Solaris 10 SPARC server to support a project where we are moving a customer from printing and snail-mailing paper invoices to e-mail a PDF of the invoice each night.   Since package management in Solaris is a bit different from Linux systems using managers like Yum or Apt I thought I’d throw the output of my efforts to the clipboard and paste them up here with a few notes.  Maybe someone will actually find this helpful.  😉

The  best place to download your packages is Unix Packages – a nice one-stop shop for Solaris.  I put all mine in the directory ~/Downloads/sol10sparc-pkgs.  It’s also worth noting that you’ll need to ‘su’ to root (or have root privileges in order to install most packages.
Once you have your package on your Solaris system it’s time to unzip it:
cd Downloads/sol10sparc-pkgs
gunzip ghostscript-9.05-sol10-sparc-local.gz
Now time to run the pkgadd command to install the software:
pkgadd -d ./ghostscript-9.05-sol10-sparc-local
Terminal output during install:
The following packages are available:
1 SMCghosts ghostscript
(sparc) 9.05

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:
Here you can just press <ENTER> and it will default to ‘all’ packages.
Processing package instance <SMCghosts> from 

ghostscript(sparc) 9.05
The Ghostscript Group
Using  as the package base directory.
## Processing package information.
## Processing system information.
5 package pathnames are already properly installed.
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing ghostscript as 

## Installing part 1 of 1.
[ verifying class  ]

Installation of  was successful.

Now let’s just say later on you kinda remember installing Ghost-something on this Solaris server. Ugh! What was it called again? Was it SMCghost . . .  or maybe SUNWghost . . .  dang it. How to find it and see what version it is?!

First, let’s grep for any package with ‘ghost’ in the name using the pkginfo command:

pkginfo | grep ghost

Terminal output:

application SMCghosts ghostscript

Ah ha!  Now we have a name (SMCghosts) and we can see details of it using the -l switch:

pkginfo -l SMCghosts

Terminal output:

NAME: ghostscript
CATEGORY: application
ARCH: sparc
BASEDIR: /usr/local
VENDOR: The Ghostscript Group
PSTAMP: Steve Christensen
INSTDATE: Mar 19 2013 15:58
STATUS: completely installed
FILES: 621 installed pathnames
5 shared pathnames
34 directories
36 executables
90499 blocks used (approx)

Now what if we want to remove it to install the latest version?  This calls for the pkgrm command:

NOTE: In Solaris it’s best to remove a package before installing a new version.  Solaris doesn’t like to ‘upgrade’, instead it tries to add the package a second time and will produce a warning.

pkgrm SMCghosts

Terminal output:

The following package is currently installed:
SMCghosts ghostscript
(sparc) 9.05

Do you want to remove this package? [y,n,?,q] y

Press <y> and <ENTER> to begin removal:

## Removing installed package instance 
## Verifying package  dependencies in global zone
## Processing package information.
## Removing pathnames in class 
## Updating system information.Removal of  was successful.

DONE!  Please leave a comment if you have any input or questions I can help with!


Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: