Skip Navigation Links | |
Exit Print View | |
Adding and Updating Oracle Solaris 11 Software Packages Oracle Solaris 11 Information Library |
1. Introduction to the Image Packaging System
2. IPS Graphical User Interfaces
3. Getting Information About Software Packages
4. Installing and Updating Software Packages
Installing and Updating Packages
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 pkg.name /usr/share/auto_install/manifest/default.xml system/install/auto-install/auto-install-common
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
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
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. |