Let's say for whatever reason -- in my case I did a really bare install of Solaris 10 -- you just realized you need a program from the Solaris install CDs/DVDs. How to get it? But, let's make it a bit more challenging: first of all, you can't use Sunfreeware; maybe they just do not have it. Second, the Solaris box you want to put this program in does not have a CD/DVD drive.
Well, we need to start somewhere; how about trying to figure out the name of the package? Yes, you can say some package names reflect the name of the program. But, there are those times the program you want is part of a larger package.
So, we need to cheat.
If you are really luck, you either have or know someone who does have access to another Solaris box which has the program. Then they can use pkgchk ask which package the program in question belongs to. For instance, which package does truss belong to? Let's find out:
# pkgchk -lp `which truss` Pathname: /usr/bin/truss Type: linked file Source of link: ../../usr/lib/isaexec Referenced by the following packages: SUNWtoo Current status: installed #
Ok, we now know truss belong to the package SUNWtoo. Now, we need to get the install CDs and mount them somewhere. I know you can mount them in Solaris (duh!) and in Linux; I have not tried in Windows or OSX. But, let's say you were successful and mounted Disk 1. Now you need to go to the Solaris_10/Product/ directory, where you will find a bunch of directories, each of them has the name of a package. If the package you want is not in this disk, try another one; it better be somewhere, right? In my case, Solaris_10/Product/SUNWtoo is what I want. I tar'ed the package and then copied it to the problematic Solaris box. After untar'ing into the /tmp directory, I then need to install the said package:
# cd /tmp # tar xf SUNWtoo.tar # pkgadd -d . SUNWtoo Processing package instance
from Programming Tools(sparc) 11.10.0,REV=2005.01.21.15.53 Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Using > as the package base directory. ## Processing package information. ## Processing system information. 10 package pathnames are already properly installed. ## Verifying package dependencies. ## Verifying disk space requirements. ## Checking for conflicts with packages already installed. ## Checking for setuid/setgid programs. This package contains scripts which will be executed with super-user permission during the process of installing this package. Do you want to continue with the installation of [y,n,?] y Installing Programming Tools as ## Installing part 1 of 1. 1982 blocks ## Executing postinstall script. Installation of was successful. #
So, is it installed? Let's find out!
# pkginfo -x SUNWtoo SUNWtoo Programming Tools (sparc) 11.10.0,REV=2005.01.21.15.53 # which truss /usr/bin/truss #