Check Whether Required Installed Packages Are Available
To update installed packages, install packages that depend on installed packages, or install a non-global zone, the repository that you set as the publisher origin must contain at least the same software that is currently installed in the image. The repository can also contain older or newer software, but it must contain the same software that is installed in the image.
Use the pkgrepo list
command, not the pkg list
command, when checking for installed packages. The pkg list
command always shows installed packages, even if the package is not available from any configured publisher origin.
The following command shows that the specified repository is a not suitable publisher origin for this image because the installed version of pkg:/entire
is not available from that origin.
$ pkg list entire NAME (PUBLISHER) VERSION IFO entire 0.5.11-0.175.2.8.0.5.0 i-- $ pkg publisher PUBLISHER TYPE STATUS P LOCATION solaris origin online F http://pkg.oracle.com/solaris/release/ $ pkgrepo list -Hs http://pkg.oracle.com/solaris/release entire@0.5.11-0.175.2.8.0.5.0 pkgrepo list: The following pattern(s) did not match any packages: entire@0.5.11-0.175.2.8.0.5.0
If the package that you need is not listed, try running the pkgrepo refresh
command and then retry the pkgrepo list
command.
The following command shows that the installed version of pkg:/entire
is available from the specified repository:
$ pkgrepo list -Hs /var/share/pkgrepos/solaris entire@0.5.11-0.175.2.8.0.5.0
solaris entire 0.5.11,5.11-0.175.2.8.0.5.0:20150325T200338Z
If a needed package is not available from a configured publisher but is available from another repository origin, take one of the following actions:
-
Use the
-g
option of thepkg set-publisher
command to add this origin for thesolaris
publisher. -
Use the
-g
and-G
options of thepkg set-publisher
command to change the origin for thesolaris
publisher. -
If a different publisher provides the package you need, use the
pkg set-publisher
command to add that publisher. -
Use the
-g
option of the installation command (install
,uninstall
,update
,change-variant
, andchange-facet
) to temporarily add a repository to the end of the list of repositories to search. -
Update your package repository to include the packages you need. See Best Practices for Creating and Using Local IPS Package Repositories in Creating Package Repositories in Oracle Solaris 11.4.