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. ;)
cd Downloads/sol10sparc-pkgs
gunzip ghostscript-9.05-sol10-sparc-local.gz
pkgadd -d ./ghostscript-9.05-sol10-sparc-local
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]:
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. /usr/local/bin/bdftops ----snip---- /usr/local/share/man/man1/wftopfa.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:
PKGINST: SMCghosts NAME: ghostscript CATEGORY: application ARCH: sparc VERSION: 9.05 BASEDIR: /usr/local VENDOR: The Ghostscript Group PSTAMP: Steve Christensen INSTDATE: Mar 19 2013 15:58 EMAIL: steve@smc.vnet.net 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 /usr/local/share/man/man1/wftopfa.1 ----snip---- /usr/local/bin/bdftops /usr/local/bin ## Updating system information.Removal of was successful.
DONE! Please leave a comment if you have any input or questions I can help with!
Cheers,
Mike