Previous Table of Contents Next


The pkgadd command, by default, looks for packages in the /var/spool/pkg directory. In this context, any packages that you have copied into that directory are "spooled" and waiting for installation. If there are no packages in the /var/spool/pkg directory, installation fails, as shown in the following example:

castle# pkgadd
pkgadd: ERROR: no packages were found in </var/spool/pkg>
castle#

To install packages directly from media, such as from a CD-ROM, you must use the -d option to specify a full (absolute) pathname to the directory on the device that contains the packages that you want to install.

If pkgadd encounters a problem, information about the problem appears along with the prompt Do you want to continue with this installation of the package?. Type yes, no, or quit and press Return.Typing yes continues with the installation. If you have specified more than one package, typing no stops the installation of the package that failed, but does not stop the installation of the other packages. Typing quit stops installation of all packages.

In the following example, although the command-line argument specifies a valid directory on the CD-ROM, that directory contains no packages and the pkgadd command returns an error message:

castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6
pkgadd: ERROR: attempt to process datastream failed
  - open of </cdrom/sol_2_6_sp1arc/
s0/Solaris_2.6> failed, errno=2
pkgadd: ERROR: could not process datastream from </cdrom/sol_2_6_sp1arc/
s0/Solaris_2.6>
castle#

In the following example, the command-line argument specifies a path to a valid directory on the CD-ROM that contains packages:

castle# pkgadd -d /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product

The following packages are available:
  1  AXILvplr.c      Axil platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.49
  2  AXILvplr.m      Axil platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.50
  3  AXILvplr.u      Axil platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.49
  4  AXILvplu.c      Axil usr/platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.51
  5  AXILvplu.m      Axil usr/platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.51
  6  AXILvplu.u      Axil usr/platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.51
  7  FJSVvplr.u      Fujitsu platform specific symlinks (Root)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  8  FJSVvplu.u      Fujitsu platform specific symlinks (user)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  9  PFUaga.m        AG-10 Device Driver
                     (sparc.sun4m) 1.4.0,REV=0.0.3
 10  PFUaga.u        AG-10 Device Driver
                     (sparc.sun4u) 1.4.0,REV=0.0.3

... 298 more menu choices to follow;
<RETURN> for more choices, <CTRL-D> to stop display:The following packages
are available:

Alternatively, you can use the cd command to change to the directory that contains the packages, and then type pkgadd -d . and press Return to proceed with installation, as shown in the following example:

castle# cd /cdrom/sol_2_6_sparc/s0/Solaris_2.6/Product
castle@ pkgadd -d .

The following packages are available:
  1  AXILvplr.c      Axil platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.49
  2  AXILvplr.m      Axil platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.50
  3  AXILvplr.u      Axil platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.49
  4  AXILvplu.c      Axil usr/platform links
                     (sparc.sun4c) 5.6,REV=96.01.21.22.51
  5  AXILvplu.m      Axil usr/platform links
                     (sparc.sun4m) 5.6,REV=96.01.21.22.51
  6  AXILvplu.u      Axil usr/platform links
                     (sparc.sun4u) 5.6,REV=96.01.21.22.51
  7  FJSVvplr.u      Fujitsu platform specific symlinks (Root)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  8  FJSVvplu.u      Fujitsu platform specific symlinks (user)
                     (sparc.sun4u) 1.0,REV=97.05.26.01
  9  PFUaga.m        AG-10 Device Driver
                     (sparc.sun4m) 1.4.0,REV=0.0.3
 10  PFUaga.u        AG-10 Device Driver
                     (sparc.sun4u) 1.4.0,REV=0.0.3

... 298 more menu choices to follow;
<RETURN> for more choices, <CTRL-D> to stop display:The following packages
are available:

Checking the Installation of a Package

You can use the pkgchk command to check the completeness, specific pathname, file contents, and file attributes of an installed package.

The syntax of the pkgcheck command follows:

pkgchk pkgid

For example, to check the package SUNWman, the online manual pages, type pkgchk SUNWman and press Return. If the prompt comes up without any messages, the package has installed properly.

oak% pkgchk SUNWman
oak%

If you do get messages, however, the package has not installed properly, as shown in the following example:

oak% pkgchk SUNWssoft
WARNING: no pathnames were associated with <SUNWssoft>
oak%

You can specify more than one package identifier by typing a list separated by spaces. If you do not specify a pkgid, the complete list of packages on a system is checked.

You can check the installation completeness of a specific pathname by using the -p option with pkgchk, using the following syntax:

pkgchk -p pathname

If you want to check more than one path, provide the paths as a comma-separated list.

You can check the installation completeness of just the file attributes by using the -a option with the pkgchk command. You can check the installation completeness of just the file contents by using the -c option with the pkgchk command. Here is the appropriate syntax:

# /usr/sbin/pkgchk [ -a | -c ] pkgid

To check the completeness of a spooled package, use the -d option with the pkgchk command. This option looks in the specified directory or on the specified device and performs a check of the package; for example:

# /usr/sbin/pkgchk -d spool-dir pkgA

In this example, the pkgchk command looks in the spool directory spool-dir and checks the completeness of the package named pkgA.


NOTE:  Spooled package checks are limited because not all information can be audited until a package is installed.


Previous Table of Contents Next