JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Adding and Updating Oracle Solaris 11 Software Packages     Oracle Solaris 11 Information Library
search filter icon
search icon

Document Information


1.  Introduction to the Image Packaging System

2.  IPS Graphical User Interfaces

3.  Getting Information About Software Packages

4.  Installing and Updating Software Packages

Previewing an Operation

Installing and Updating Packages

Boot Environment Options

Installing a New Package

Installing a Package into a New Boot Environment

Rejecting a Package

Updating a Package

Fixing Package Problems

Verifying Package Installation

Fixing Verification Errors

Restoring a File

Uninstalling Packages

5.  Configuring Installed Images

Fixing Package Problems

An example of a problem that could occur after a package is installed is that a file delivered by the package becomes corrupted. In the example shown in this section, the /usr/share/auto_install/manifest/default.xml file has been deleted.

Use the pkg search command to determine which package delivered the missing file:

$ pkg search -l -Ho /usr/share/auto_install/manifest/default.xml

Verifying Package Installation

Use the pkg verify command to validate the installation of packages in the current image.

/usr/bin/pkg verify [-Hqv] [pkg_fmri_pattern ...]

If current signature policy for related publishers is not ignore, the signatures of each package are validated based on policy. See signature-policy in Properties For Signing Packages for an explanation of how signature policies are applied.

Use the -H option to omit the headers from the verification output. Use the -q option to print nothing but return failure if any fatal errors are found. Use the -v option to include informational messages regarding packages.

# pkg verify -v system/install/auto-install/auto-install-common
PACKAGE                                                           STATUS
pkg://solaris/system/install/auto-install/auto-install-common      ERROR
        file: usr/share/auto_install/manifest/default.xml
                Missing: regular file does not exist

Fixing Verification Errors

Use the pkg fix command to fix package installation errors reported by the pkg verify command.

/usr/bin/pkg fix [--accept] [--licenses] [pkg_fmri_pattern ...]

Verification of installed package content is based on a custom content analysis that might return different results than those of other programs.

Use the --accept option to indicate that you agree to and accept the terms of the licenses of the packages that are updated or installed. If you do not provide this option, and any package licenses require acceptance, the fix operation fails. Use the --licenses option to display all of the licenses for the packages that are updated as part of this operation.

# pkg fix --accept system/install/auto-install/auto-install-common
Verifying: pkg://solaris/system/install/auto-install/auto-install-common      ERROR
        file: usr/share/auto_install/manifest/default.xml
                Missing: regular file does not exist
Created ZFS snapshot: 2011-09-28-05:34:02
Repairing: pkg://solaris/system/install/auto-install/auto-install-common

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                                  1/1         1/1      0.0/0.0

PHASE                                        ACTIONS
Update Phase                                     1/1

PHASE                                          ITEMS
Image State Update Phase                         2/2

Restoring a File

Use the pkg revert command to restore files to their as-delivered condition.

/usr/bin/pkg revert [-nv] [--no-be-activate]
    [--no-backup-be | --require-backup-be] [--backup-be-name name]
    [--deny-new-be | --require-new-be] [--be-name name]
    (--tagged tag-name ... | path-to-file ...)

Either all files tagged with a particular tag-name, or individual files can be reverted. File ownership and protections are also restored.


Caution - Reverting some editable files to their default values can make the system unbootable, or cause other malfunctions.