Adding Packages

Use the pkgadd command to install software packages. The default pkgadd command is interactive and can inform you of potential problems in the installation as they occur.

NOTE

You must have superuser privileges to use the pkgadd command.


The pkgadd command has the following syntax.

pkgadd -d device-name [ -a admin-file ] pkgid
					

The -d device-name option of the pkgadd command enables you to specify three different types of locations. Table 72 describe these locations and provides an example of the -d device-name option for each location.


Table 72. Examples of -d Option Locations
Location Example of Command Syntax
Packages stored in a CD-ROM file system. pkginfo -d /cdrom/cdrom0
Packages stored on raw media such as a tape. pkginfo -d /dev/rmt/0
Packages stored in a raw package file that is written into a file system. pkginfo -d /tmp/raw-pkg-file

For example, to interactively install a software package named SUNWpkgA from a directory named /cdrom/cdrom0, type /usr/sbin/pkgadd -d /cdrom/cdrom0 SUNWssser and press Return. To install the a software package stored on a tape with an alternative administrative file named admin located in the /var/sadm/install/admin directory, type /usr/sbin/pkgadd -d /dev/rmt/0 -a admin SUNWssser and press Return. See “Setting Up Package Administration Files” for information about package administrative files.

You can install multiple packages from the command line by typing a list of pkgids separated by spaces. The following example shows an edited example of installation of SearchIt 2.0 software from the /cdrom/cdrom0 directory.

						# pkgadd -d /cdrom/cdrom0 SUNWssser SUNWsssra SUNWsssrb SUNWsssrc SUNWsssrd SUNWssstr

Processing package instance <SUNWssser> from </cdrom/cdrom0>

SearchIt Text Messages and Handbook
(sparc) 2.0

(C) 1992, 1993 Sun Microsystems, Inc. Printed in the United States of America.
 2550 Garcia Avenue, Mountain View, California, 94043-1100
U.S.A.

(Additional copyright information not shown)

Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying package dependencies.
WARNING:
The <SUNWsssra> package "SearchIt Runtime 1 of 3" is a prerequisite package
 and should be installed.

Do you want to continue with the installation of this package [y,n,?] y
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.

The following files are already installed on the system and are being
used by another package:
/opt <attribute change only>

Do you want to install these conflicting files [y,n,?,q] y
## Checking for setuid/setgid programs.

Installing SearchIt Text Messages and Handbook as <SUNWssser>

## Installing part 1 of 1.
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/Home.info
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/Index.info
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/Search.info
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/SearchIt.handbook
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/SearchIt.info
/opt/SUNWssoft/SearchIt/share/locale/C/LC_HELP/Viewer.info
/opt/SUNWssoft/SearchIt/share/locale/C/LC_MESSAGES/SUNW_SEARCHIT_LABELS.po
/opt/SUNWssoft/SearchIt/share/locale/C/LC_MESSAGES/SUNW_SEARCHIT_MESSAGES.po
/opt/SUNWssoft/SearchIt/share/locale/C/LC_MESSAGES/SUNW_SEARCHIT_XVBROWSER.po
[ verifying class <none> ]

Installation of <SUNWssser> was successful.

Processing package instance <SUNWsssra> from </cdrom/cdrom0>

SearchIt Runtime 1 of 3
(sparc) 2.0

(Copyright information not shown)

Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
   3 package pathnames are already properly installed.
## Verifying package dependencies.
WARNING:
The <SUNWsssrb> package "SearchIt Runtime 2 of 3" is a prerequisite package
 and should be installed.
WARNING:
The <SUNWsssrc> package "SearchIt Runtime 3 of 3" is a prerequisite package
 and should be installed.

Do you want to continue with the installation of this package [y,n,?] y
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

Installing SearchIt Runtime 1 of 3 as <SUNWsssra>
## Installing part 1 of 1.
/opt/SUNWssoft/SearchIt/README
/opt/SUNWssoft/SearchIt/bin/auto_index
/opt/SUNWssoft/SearchIt/bin/browseui
/opt/SUNWssoft/SearchIt/bin/catopen
/opt/SUNWssoft/SearchIt/bin/collectionui
(Additional files not shown)
[ verifying class <none> ]

Installation of <SUNWsssra> was successful.

Processing package instance <SUNWsssrb> from </cdrom/cdrom0>

SearchIt Runtime 2 of 3
(sparc) 2.0

(Copyright information not shown)

Using </opt> as the package base directory.
## Processing package information.
## Processing system information.
   4 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.

Installing SearchIt Runtime 2 of 3 as <SUNWsssrb>
## Installing part 1 of 1.
/opt/SUNWssoft/SearchIt/lib/fultext/fultext.ftc
/opt/SUNWssoft/SearchIt/lib/fultext/fultext.stp
/opt/SUNWssoft/SearchIt/lib/libft.so.1
[ verifying class <none> ]

(Additional package installations not shown)

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 the /var/spool/pkg directory contains no packages, installation fails, as shown in the following example.

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

To install packages from a CD-ROM, a tape, or a raw package file in a file system, you must use the -d option to specify a full (absolute) path name to the directory on the device that contains the packages that you want to install.

If pkgadd encounters a problem, information about the problem is displayed 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/cdrom0
pkgadd: ERROR: no packages were found in </cdrom/sol_8_1000_doc>
castle#

castle# pkgadd -d /cdrom/sol_8_1000_doc/Solaris_8_Doc/sparc/Product

The following packages are available:
  1  SUNWab2r     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  2  SUNWab2s     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  3  SUNWab2u     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

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

castle# pkgadd -d /cdrom/sol_8_1000_doc/Solaris_8_Doc/sparc/Product

The following packages are available:
  1  SUNWab2r     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  2  SUNWab2s     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  3  SUNWab2u     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

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_8_1000_doc/Solaris_8_Doc/sparc/Product
castle# pkgadd -d .

The following packages are available:
  1  SUNWab2r     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  2  SUNWab2s     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804
  3  SUNWab2u     AnswerBook2 Documentation Server
                  (sparc) 3.0,REV=2000.0804

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.20.125