Go to main content

Updating Systems and Adding Software in Oracle® Solaris 11.4

Exit Print View

Updated: August 2018
 
 

Troubleshooting Package Installation and Update

This appendix shows how to handle some errors that you might see when you install or update packages, including:

  • Package cannot be installed

  • Cannot satisfy constraints

This appendix first describes information that you should check when you first begin to troubleshoot. Following these suggestions can save you a large amount of time.

This appendix also provides tips for increasing performance and minimizing stored metadata.

Initial Troubleshooting Steps

The following checks should be done first for almost any package installation problem:

  • Check which version of the pkg:/entire constraint package is installed. You might need to update the pkg:/entire package.

    The following command shows the version of the pkg:/entire package that is installed in this image:

    $ pkg list -v entire
  • Check your package publisher origin. You might need to add or remove publisher origins.

    The following command lists publishers that are configured in this image that are enabled:

    $ pkg publisher -n

    Use the –-no-network-cache global option to ensure that you are seeing the current content of configured publisher locations and not a cached copy. See the pkg(1) man page for more information.

    See Enabling and Disabling Publisher Origins for information about how to see whether particular publisher locations are currently enabled.

  • Check whether any version-lock facet is set to false. See Relaxing Version Constraints Specified by Constraint Packages for more information.

    $ pkg facet
  • Check whether any package is frozen at a particular version. See Locking Packages to a Specified Version for more information.

    $ pkg freeze
  • Check whether an IDR is installed. You might need to reject the IDR. See Installing an IDR Custom Software Update for information on installing superseding IDRs and removing IDRs.

    The following command lists any IDRs that are installed:

    $ pkg list '*idr*'
  • Check whether packages installed from a different publisher might be blocking your update or installation.

    The following command lists any packages that are installed from the internalpublisher publisher:

    $ pkg list -v '*internalpublisher*'

Check whether the package you want to install is available from configured publishers and can be installed in this image. The following command shows whether the package you want to install is available from configured publishers. See also Check Available Versions.

$ pkg list -af name-of-package-to-install

When you have determined that the packages you need are available from configured publishers, use the following steps as you proceed with your installation:

  • Use the -nv options whenever you install or update to see what changes will be made, such as which versions of which packages will be installed or updated and whether a new BE will be created. The -v option also shows any release notes that apply to this particular installation or update operation. See also Preview the Update Operation.

  • To receive more detailed error messaging, specify more of the FMRI of the package you want to install, including the version and publisher.

If you are updating, the system must have access to a package repository that provides the packages that are currently installed on the system. For example, if you are updating from Oracle Solaris 11.3 to Oracle Solaris 11.4, the solaris publisher must be configured with access to both the installed Oracle Solaris 11.3 packages and the desired Oracle Solaris 11.4 packages. If packages are installed from another publisher, such as ha-cluster or solarisstudio, those publishers also must be configured with access to currently installed packages as well as desired newer packages.

The cause of most update errors is an incomplete package repository. See Best Practices for Creating and Using Local IPS Package Repositories in Creating Package Repositories in Oracle Solaris 11.4.

Check the Installed Version of pkg:/entire

Understanding IPS package versioning and how versions of two different packages compare is often very important for troubleshooting package installation and update issues. See Fault Management Resource Identifiers and Package Version in Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.4 for more information.

Use the pkg info or pkg list command to check the version of the pkg:/entire constraint package that is currently installed.

$ pkg list -Hv entire
pkg://solaris/entire@0.5.11,5.11-0.175.2.8.0.5.0:20150325T200338Z      i--

The version of this pkg:/entire constraint package indicates that this system is running Oracle Solaris 11.2 SRU 8.5.

The pkg:/entire constraint package constrains the versions of many other packages to help maintain a working, supportable image. See Constraint Packages for more information about packages constrained by constraint packages.

You cannot directly install or update a package that is constrained by the pkg:/entire constraint package. To install or update packages that are constrained by pkg:/entire, you must update the pkg:/entire package. For more information, see Cannot Satisfy Constraints. In some cases, you can remove the constraints as shown in Updating a Package Constrained by a Constraint Package.

Check the Content of Your Configured Publisher Origins

Use the pkg publisher command to check your package publisher origins.

$ pkg publisher
PUBLISHER  TYPE    STATUS P LOCATION
solaris    origin  online F http://pkg.oracle.com/solaris/release/

For a secure URI, make sure you have the required key and certificate properly installed, and use the -k and -c options when you configure the publisher.

If your site requires a proxy for external locations, use the --proxy option of the pkg set-publisher command to set that proxy. See Specifying a Proxy for instructions.

Use the pkg publisher publisher command to view more information about the publisher, such as key, certificate, and proxy.

If any origin URI of any of your enabled publishers is unreachable, the install or update operation fails, even if the locations you need are reachable. If you cannot fix the problem that makes the location unreachable, you can remove the unreachable origin with pkg set-publisher -G, disable the unreachable origin with pkg set-publisher -dg as shown in Enabling and Disabling Publisher Origins, or disable the publisher with pkg set-publisher -d. If you no longer need this publisher, use pkg unset-publisher to remove the publisher.

Check whether your package publisher origin contains the packages you need. For example, if your solaris publisher origin is set to the public release repository, then you cannot update a package to a version that is only available from a support repository.

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 the pkg set-publisher command to add this origin for the solaris publisher.

  • Use the -g and -G options of the pkg set-publisher command to change the origin for the solaris 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, and change-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.

Check Whether the Packages You Want to Install Are Available

Use the following command to check whether the package you want to install is available from your configured publishers. If you are updating a package, both the version of that package that is currently installed and the version to which you want to update should be available.

$ pkg list -af package

If the package that you need is not listed, try running the pkg refresh command and then retry the pkg list command.

If the package that you need still is not listed, add a new publisher or a new publisher origin or update your package repository.

Check Whether the Packages You Want to Install Are Installable in This Image

If the package version you want is listed when you use the -af options, then use the same command again without the -f option:

$ pkg list -a package

If the version you want is still listed, then this package is not constrained and you should be able to install it without installing or updating any other packages.

If the version you want is not listed, then this version is available from configured publishers but not installable in this image. Reasons that a package is not installable can include the following:

  • The package is constrained by variant or facet settings.

  • The version of the package is constrained by a constraint package. You can update the constraining package or, in some cases, you can relax the constraint. For more information, see Cannot Satisfy Constraints.

  • The version of the package is constrained by a freeze operation. Run the pkg freeze command. The freeze could be on a package that has a require dependency on a different version of the package you want to install and both versions cannot be installed at the same time.

Retry Your Installation

If you specify a package to install or update and you do not specify the publisher, the first publisher in the publisher search order that provides a package that matches that package FMRI or pattern is used as the installation source. If that publisher does not provide a version of the package that can be installed in this image, then the installation operation fails, even if another enabled publisher provides a version of the package that can be installed in this image. Take one of the following actions to address this issue:

  • Specify the publisher in the package FMRI. For example, specify pkg://solaris/ in front of the full package name.

  • Use the -P option of the pkg set-publisher command to set the publisher that provides the package version you want as the first publisher in the search order.

Two publishers should not provide packages with the same name. If this situation occurs, take one of the following actions:

  • If you no longer need any of the packages from one of the publishers, disable or unset that publisher. If packages from that publisher are currently installed, uninstall them before you disable or unset the publisher.

  • If you need both publishers, do one of the following:

    • Make sure the publisher that is not preferred is not sticky (--non-sticky), and set the publisher search order so that the publisher that provides the package you want to install is ahead of any other publisher that provides the same-named package.

    • Specify the full name of the package you want to install, including the publisher.

Use the pkg freeze and pkg facet commands to check whether a frozen or version-locked package is preventing installation or update.

Use the pkg verify -v command to check whether packaged content has been modified. Use the pkg fix command to fix any errors that were found.

Use the -nv options whenever you install or update to see what changes will be made, such as which versions of which packages will be installed or updated and whether a new BE will be created. The -v option also shows any release notes that apply to this particular install or update operation.

  • If you do not receive any error messages when you use the -nv options, run the command again without the -n option to actually perform the installation or update. Consider whether you should specify options to do the installation in a new BE or to create a backup BE if no new BE or backup BE will be created by default.

  • If you do receive error messages, take the following actions:

    • Specify more of the version you want in the package FMRI to get more information to help you diagnose and fix the problem.

    • Specify more -v options (for example, -nvv).

    • Use the pkg history command. The -l option provides complete FMRIs of changed packages. See Viewing Operation History.

If you specify multiple packages to install or update, or if you omit the package specification for an update operation, the installation or update operation fails if any of the packages cannot be installed in this image. If one package cannot be installed, no packages are installed. For more information, invoke the command again, specifying only the package that cannot be installed, specifying the full FMRI of that package, and providing one or more -v options.