Adding and Updating Software in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Troubleshooting Package Installation and Update

This appendix shows how to handle some errors that you might see when you install or update packages. This appendix also provides tips for increasing performance and minimizing stored metadata.

Initial Troubleshooting Steps

Check whether the package you want to install is available from configured publishers and can be installed in this image. The installed version of pkg:/entire and the publisher origins configured in this image are required pieces of information. You might need to update the pkg:/entire package. You might need to modify publisher origins.

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

  • Check which version of the pkg:/entire incorporation package is installed.

  • Check your package publisher origin.

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.

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

Check the Installed Version of pkg:/entire

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

$ pkg list entire
NAME (PUBLISHER)                                  VERSION                    IFO
entire                                            0.5.11-0.175.2.0.0.34.0    i--
$ pkg list -Hv entire
pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.34.0:20140303T182643Z           i--

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

You cannot directly install or update a package that is constrained by the pkg:/entire incorporation 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 an Incorporation.

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 or disable that publisher with pkg set-publisher --disable. 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.0.0.34.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.0.0.34.0
pkgrepo list: The following pattern(s) did not match any packages:
        entire@0.5.11-0.175.2.0.0.34.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 /export/IPSpkgrepos/Solaris entire@0.5.11-0.175.2.0.0.34.0
solaris   entire                   0.5.11,5.11-0.175.2.0.0.34.0:20140303T182643Z

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.

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.

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 an incorporation 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.

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.

Cannot Access Publisher or Repository

The errors discussed in this section are related to an inability to access the URI of the publisher.

Cannot Access Package Repository

Error messages:

  • Couldn't resolve host

  • Unable to contact any configured publishers

  • Unable to contact valid package repository

  • Origin URIs do not appear to point to a valid pkg repository

Use the pkg publisher command to display the URIs of your publishers. See the LOCATION column or the URI row in the following examples:

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

If publishers are listed that you are no longer using, either disable or remove those publishers:

$ pkg set-publisher --disable publisher
$ pkg unset-publisher publisher

For publishers that you are using, make sure the URIs are correct.

  • Try to view each publisher origin location in a browser or ping that location.

  • Try to list packages at that origin by using the pkgrepo list command.

If an origin location is not correct, use the -G and -g options of the pkg set-publisher command together to change the URI.

If a publisher has more than one origin, all origin locations must be accessible. If any origin location is not accessible, use the -G option of the pkg set-publisher command to remove that origin.

If a publisher is configured in a non-global zone, all locations for that publisher must be accessible from the global zone even if that publisher is not configured in the global zone.

SSL Certificate Problem

Error message: SSL certificate problem, verify that the CA cert is OK

Take one or more of the following actions if the pkg command displays a message about an SSL certificate problem:

  • Make sure the required key and certificate are installed. Information about how to obtain a key and certificate should be included with other information about the secure repository.

  • Use the -k and -c options with the pkg set-publisher command to specify the locations where the key and certificate are installed. The pkg publisher command for the publisher shows where the publisher expects to find the key and certificate. If the key and certificate are installed elsewhere, reconfigure the publisher, specifying the correct values for the -k and -c options.

    In the following example, the output shows the key and certificate file paths and shows that the certificate for the configured origin for the abc publisher is expired:

    $ pkg publisher abc
     Publisher: abc
    Origin URI: https://pkg.oracle.com/abc/release/
       SSL Key: /var/pkg/ssl/keyfile
      SSL Cert: /var/pkg/ssl/certfile
    Certificate '/var/pkg/ssl/certfile' has expired.
      Please install a valid certificate.
  • Make sure the time and date are correct on the system.

  • Refresh the ca-certificates SMF service:

    $ svcadm refresh svc:/system/ca-certificates:default
  • If the origin URI contains oc-mgmt, contact your Ops Center support representative.


Note -  A repository that requires a client SSL certificate cannot be specified by using a -g option with a pkg installation command.

Location Not Found

Error message: http protocol error: code: 404 reason: Not Found

Check your publisher URIs as described in Cannot Access Package Repository. If you can view or ping the location successfully, use the pkgrepo list command to try to show one of the packages in the repository.

If the URI is a file-based repository, make sure the files and directories are readable by the pkg5srv user. You can use the pkgrepo verify command to check whether the repository is readable by the pkg5srv user.

Check your web server configuration. See Chapter 5, Running the Depot Server Behind a Web Server, in Copying and Creating Package Repositories in Oracle Solaris 11.2 for more information.

  • If you run the package depot server behind an Apache web server instance, include the following setting in your httpd.conf file to not decode encoded forward slashes:

    AllowEncodedSlashes NoDecode
  • Set the depot server pkg/proxy_base to the URL of the repository on the Apache server:

    $ svccfg -s pkg/server:repo setprop pkg/proxy_base = astring: http://pkg.example.com/myrepo
    $ svcadm refresh pkg/server:repo

If the problem occurs in a non-global zone, take the following troubleshooting steps. Remember that non-global zones use a special package repository called the system repository. See the pkg.sysrepo(1M) man page for more information about the system repository.

  • You cannot use the -g option in an image that has non-global zones. Instead, use the pkg set-publisher command to explicitly add that publisher and origin.

  • Make sure the files and directories in file-based repositories are readable by the pkg5srv user. The pkg5srv user runs the system-repository Apache instance. See Relationship Between Global and Non-Global Zones for examples that show how to find the location of a system repository.

  • If your site requires a proxy to access external locations, make sure the proxy has been specified correctly for publishers in the global zone. Use the --proxy option of the pkg set-publisher command to specify the proxy. See Specifying a Proxy for instructions. One way to check your proxy is to make sure you get no access error messages from the pkg refresh --full command.

  • Make sure the service svc:/application/pkg/system-repository:default is online in the global zone.

  • Make sure the service svc:/application/pkg/zones-proxyd:default is online in the global zone and the service svc:/application/pkg/zones-proxy-client:default is online in the non-global zone.

  • In the global zone, check the log files in /var/log/pkg/sysrepo/* for any permissions errors reported when trying to read files. Check for 404 or 503 errors reported in /var/log/pkg/sysrepo/access_log. Check for errors reported in /var/log/pkg/sysrepo/error_log.

  • In the global zone, verify that localhost is set to 127.0.0.1 in the /etc/hosts file. Verify that Listen is set to 127.0.0.1:1008 and ServerName is set to 127.0.0.1 in the /system/volatile/pkg/sysrepo/sysrepo_httpd.conf file.

  • In the global zone, check whether the file /system/volatile/pkg/sysrepo/sysrepo_httpd.conf contains Alias lines of the following form:

    $ grep Alias /system/volatile/pkg/sysrepo/sysrepo_httpd.conf
    WSGIScriptAlias /wsgi_p5p /etc/pkg/sysrepo/sysrepo_p5p.py

    If the sysrepo_httpd.conf file has no Alias lines, restart the sysrepo service:

    $ svcadm restart svc:/application/pkg/system-repository:default

Service Is Not Available

Error message: http protocol error: code: 503 reason: Service Unavailable

Use the pkg publisher command to find the location of the package repository that you are trying to use, and examine SMF services on that system. Use the following command to identify any package repository SMF service instances that are enabled but not running and any instances that are preventing another enabled instance from running:

$ svcs -xv pkg/server
svc:/application/pkg/server: default (image packaging repository)
 State: online since July 25, 2013 07:53:50 AM PDT
   See: /var/svc/log/application-pkg-server:default.log
Impact: None.

If any service is reporting a problem, check the log file listed in the svcs output to determine the specific problem.

Make sure that the inst_root property, the port property, and other properties are set correctly.

$ svcprop -p pkg pkg/server:default
$ svcprop -p pkg/inst_root -p pkg/port pkg/server:default
/export/IPSpkgrepos/Solaris
80

If necessary, use the svccfg command to reset property values, as shown in the following example:

$ svccfg -s pkg/server:default setprop pkg/port=1008

Use the svcadm command to clear, refresh, restart, and enable the service instance as necessary.

No Updates Are Available

Error message: No updates available for this image

If you are updating a particular package, use the following command to show what version of that package is currently installed in this image. If you are updating all installed packages (pkg update with no packages specified or with '*' specified for the package name), use pkg:/entire for package in these commands.

$ pkg list -v package

If no version is currently installed, use the pkg install command, not pkg update.

If a version of package is currently installed, use the following command to show which versions of package are available from your configured publishers:

$ pkg list -afv package

If the package with the highest version number is already installed, then perhaps no newer version exists.

If a newer version does exist, determine the package repository location where the newer version is available, and use the pkg set-publisher command to reset the origin URI or add an origin URI for the appropriate publisher. If necessary, install any required key and certificate and use the -k and -c options to specify them. Use the pkgrepo list command to verify that the currently installed version of the package also is available from configured publishers.

Execute the pkg update command again, specifying the -nv options and including the version (or the keyword latest) in the FMRI of the packages you want to install, as shown in the following example. Providing more information in the package names usually gives you more information in any error output.

$ pkg update -nv package@latest

Package Cannot Be Installed

Error message: No matching version of package can be installed

Use the following command to show which versions of package are available from your configured package publishers:

$ pkg list -afv package

Specify more of the FMRI of the package you want to install. The first match found might not be installable in this image, but the specific version you want to install might be installable. If the more specific FMRI is still not installable, specifying more of the FMRI should display more information about why the package cannot be installed.

Verify that the version of the package you want to install or update is not frozen. Use the pkg freeze command with no arguments to display a list of all packages whose versions are frozen.

Use the following command to show what version of the pkg:/entire package is installed:

$ pkg list -v entire

You cannot install or update a package that is constrained by the pkg:/entire incorporation package or by some other incorporation package. You must update the incorporation package. For more information, see Cannot Satisfy Constraints.

Cannot Satisfy Constraints

Error message: No solution was found to satisfy constraints

This message indicates that you attempted to install a version of a package that does not match the version to which the package is constrained by an incorporation package. See Incorporation Packages for information about incorporation packages and constraints.

Incorporations constrain a set of packages to versions that work together to help maintain a supportable image. For this reason, you should not update one package that is constrained by an incorporation. Instead, you should update the incorporation package, which results in updating all the constrained packages to a new tested-together set of versions.

When packages are being modified (for example, being updated), the pkg client examines related packages and their dependencies. If any dependent package cannot be installed or updated, a separate error message is produced for each package that has a dependency on the package that cannot be installed or updated. The most effective way to handle a large number of error messages is to examine the error messages that are the most indented first.

Updating a Package Constrained by an Incorporation

Error messages:

  • No suitable version of installed package package found

  • All versions matching 'incorporate' dependency package are rejected

  • This version excluded by specified installation version

  • This version is excluded by installed incorporation

For packages constrained by an incorporation, best practice is to update the incorporation package, keeping all of the constrained packages as a tested-together set.

If you still want to update just one package from an incorporation, check whether that package has a version-lock facet set to true. If a package has an associated version-lock facet, then you can unlock that package from its incorporation. Set the version-lock facet to false to remove the constraint, and then try again to install or update the package. Specify the -nv options and the version of the package you want in the FMRI of the package name. See also Relaxing Version Constraints Specified by Incorporations.

Example 5-6  Unlocking and Updating the Java Runtime Environment

The following example shows how to update the runtime/java/jre-7 package. The jre-7 package is constrained by the consolidation/java/java-incorporation package, and the java-incorporation package is in turn constrained by the pkg:/entire incorporation package.

The following command shows that the 0.175.2.0.0.9.0 version of jre-7 is currently installed and shows that a newer version is available from configured package repositories:

$ pkg list -af runtime/java/jre-7
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-7                                1.7.0.21-0.175.2.0.0.13.0  ---
runtime/java/jre-7                                1.7.0.17-0.175.2.0.0.9.0   i--

Removing the -f option shows which versions are available to update to. The following pkg list output shows that no newer version can be installed in this image, and the pkg update command output confirms this state. The -n option shows what changes would be made but does not make any changes.

$ pkg list -a runtime/java/jre-7
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-7                                1.7.0.17-0.175.2.0.0.9.0   i--
$ pkg update -nv runtime/java/jre-7
No updates available for this image.

To show more information about why this package cannot be updated, specify the version to which you want to update. The output shown in the following example indicates that the installed java-incorporation@0.5.11,5.11-0.175.2.0.0.9.0 package does not allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0 package. The java-incorporation@0.5.11,5.11-0.175.2.0.0.13.0 package would allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0 package, but the installed entire@0.5.11,5.11-0.175.2.0.0.12.0 incorporation package does not allow the installation of the jre-7@1.7.0.21-0.175.2.0.0.13.0 package.

$ pkg update -nv runtime/java/jre-7@1.7.0.21-0.175.2.0.0.13.0
pkg update: No solution was found to satisfy constraints

maintained incorporations:
  [output omitted]
  pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z

Plan Creation: dependency error(s) in proposed packages:
  [output omitted]
  No suitable version of required package pkg://solaris/consolidation/java/java-
incorporation@0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z found:
    Reject:  pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1
75.2.0.0.9.0:20130304T213946Z
    Reason:  All versions matching 'incorporate' dependency pkg:/runtime/java/jr
e-7@1.7.0.17,5.11-0.175.2.0.0.9.0 are rejected
      Reject:  pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0:20
130304T214022Z
      Reason:  This version excluded by specified installation version
        Reject:  pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0:
20130304T214022Z
        Reason:  This version excluded by specified installation version
      Reject:  pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0
.175.2.0.0.13.0:20130429T145534Z
      Reason:  This version is excluded by installed incorporation pkg://solaris
/entire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z

Plan Creation: Errors in installed packages due to proposed changes:
  [output omitted]
  No suitable version of installed package pkg://solaris/consolidation/java/java
-incorporation@0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z found
    Reject:  pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1
75.2.0.0.9.0:20130304T213946Z
    Reason:  All versions matching 'incorporate' dependency pkg:/runtime/java/jr
e-7@1.7.0.17,5.11-0.175.2.0.0.9.0 are rejected
      Reject:  pkg://solaris/runtime/java/jre-7@1.7.0.17,5.11-0.175.2.0.0.9.0:20
130304T214022Z
      Reason:  This version excluded by specified installation version
    Reject:  pkg://solaris/consolidation/java/java-incorporation@0.5.11,5.11-0.1
75.2.0.0.13.0:20130429T145534Z
    Reason:  This version is excluded by installed incorporation pkg://solaris/e
ntire@0.5.11,5.11-0.175.2.0.0.12.0:20130415T172730Z

Best practice is to update the entire package. Updating the entire package would update the java-incorporation package, which would update the jre-7 package. In this example, you need to update the Java packages and cannot move your image forward to an updated version of entire.

The version of the Java software that can be installed is constrained by setting the version-lock facet for the Java incorporation package. To update the Java software without updating other software, unlock the version-lock facet of the Java incorporation package and then update the Java incorporation package. For more information about version-lock facets, see Relaxing Version Constraints Specified by Incorporations.

The following command changes the value of the version-lock facet of the installed java-incorporation package to false. The number of packages to update is the number of packages installed in this image, because each package in the image is checked for this facet.

$ pkg change-facet \
facet.version-lock.consolidation/java/java-incorporation=false
            Packages to update: 856
     Variants/Facets to change:   1
       Create boot environment:  No
Create backup boot environment: Yes

Planning linked: 1/1 done
PHASE                                          ITEMS
Removing old actions                             1/1
Updating image state                            Done
Creating fast lookup database                   Done
Reading search index                            Done
Building new search index                    856/856

The following command shows that the facet value has been changed:

$ pkg facet
FACETS                                                   VALUE
facet.version-lock.consolidation/java/java-incorporation False

Because the following command specifies the -n option, this command shows what would be change but does not actually make any changes to your image.

$ pkg update -nv java-incorporation
            Packages to update:         2
     Estimated space available:  80.91 GB
Estimated space to be consumed: 687.28 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No

Changed packages:
solaris
  consolidation/java/java-incorporation
    0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z -> 0.5.11,5.11-0.175.2.0.0.13.0
:20130429T145534Z
  runtime/java/jre-7
    1.7.0.17,5.11-0.175.2.0.0.9.0:20130304T214022Z -> 1.7.0.21,5.11-0.175.2.0.0.
13.0:20130429T145626Z

The following command performs the actual update. This command performs the update in the current image. You might want to use the --be-name option to perform the update in a new boot environment.

$ pkg update -v java-incorporation
            Packages to update:         2
     Estimated space available:  80.91 GB
Estimated space to be consumed: 687.28 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No

Changed packages:
solaris
  consolidation/java/java-incorporation
    0.5.11,5.11-0.175.2.0.0.9.0:20130304T213946Z -> 0.5.11,5.11-0.175.2.0.0.13.0
:20130429T145534Z
  runtime/java/jre-7
    1.7.0.17,5.11-0.175.2.0.0.9.0:20130304T214022Z -> 1.7.0.21,5.11-0.175.2.0.0.
13.0:20130429T145626Z
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                2/2       171/171    61.9/61.9    0B/s

PHASE                                          ITEMS
Removing old actions                             7/7
Installing new actions                           6/6
Updating modified actions                    170/170
Updating package state database                 Done
Updating package cache                           2/2
Updating image state                            Done
Creating fast lookup database                   Done
Reading search index                            Done
Updating search index                            2/2

The following command verifies that the jre-7 package is updated in this image. If you perform the update in a new boot environment, use beadm mount and the pkg -R to do the following check in that new boot environment.

$ pkg list jre-7
NAME (PUBLISHER)                                  VERSION                    IFO
runtime/java/jre-7                                1.7.0.21-0.175.2.0.0.13.0  i--

Updating an Incorporation When a Suitable Dependency Cannot Be Found

Error message: A version for 'incorporate' dependency cannot be found

See Incorporation Packages for information about incorporation packages and their incorporate dependencies.

Examples of reasons an incorporation package might fail to update include the following installation states of an incorporate dependency of the incorporation package:

  • The dependent package is frozen at a different version.

  • The dependent package is already installed at a higher version.

  • The dependent package is installed from a different publisher, and that publisher is sticky.

Example 5-7  Updating pkg:/entire When a Dependency is Unlocked and Separately Updated

The following example attempts to update all installed packages because no package names are specified. One of the installed packages that this operation attempts to update is the pkg:/entire incorporation package. This example shows an incorporate dependency of pkg:/entire that is already installed at a higher version.

$ pkg update --be-name s11.2
Creating Plan (Solver setup): /
pkg update: No solution was found to satisfy constraints
Plan Creation: Package solver has not found a solution to update to latest available versions.
This may indicate an overly constrained set of packages are installed.

latest incorporations:
[output omitted]
pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z

The following indicates why the system cannot update to the latest version:

No suitable version of required package pkg://solaris/entire@0.5.11,5.11-0.175.2
.0.0.10.0:20130318T181506Z found:
 Reject:  pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z
 Reason:  A version for 'incorporate' dependency on pkg:/consolidation/ub_javavm
/ub_javavm-incorporation@0.5.11,5.11-0.175.2.0.0.9.0 cannot be found

This message says that the version of the pkg:/entire incorporation package to which the system attempted to update specifies a version of the ub_javavm-incorporation package that cannot be installed. Because one package cannot be installed, no packages are installed and the update fails.

The following techniques can provide more information about why the ub_javavm-incorporation package cannot be installed:

  • Use -v options. For example, use -v or -vv to receive more verbose output.

  • Specify a package to update. Providing more detailed input often results in more detailed messaging. For example, in addition to the name of the package, include the version in the package FMRI.

The following command includes a -v option and specifies to update to the entire@0.5.11,5.11-0.175.2.0.0.10.0 package, copied from the message above. This command also specifies the -n option instead of the --be-name option. The -n option shows what will be done but does not actually make any changes to this image.

$ pkg update -nv entire@0.5.11,5.11-0.175.2.0.0.10.0
Creating Plan (Solver setup): /
pkg update: No matching version of entire can be installed:
 Reject:  pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.10.0:20130318T181506Z
 Reason:  All versions matching 'require' dependency pkg:/consolidation/ub_javav
m/ub_javavm-incorporation are rejected
  Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,
5.11-0.151.0.1:20101105T053418Z
  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.17
5.0.0.0.2.0:20111019T144756Z
  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.17
5.0.10.1.0.0:20120920T143020Z
  Reason:  Excluded by proposed incorporation 'entire'
  Newer version pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.
5.11,5.11-0.175.2.0.0.13.0:20130429T145201Z is already installed
  Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,
5.11-0.175.2.0.0.9.0:20130304T213739Z
  Reason:  Newer version pkg://solaris/consolidation/ub_javavm/ub_javavm-incorpo
ration@0.5.11,5.11-0.175.2.0.0.13.0:20130429T145201Z is already installed
 Reject:  pkg://solaris/consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5
.11-0.175.2.0.0.13.0:20130429T145201Z
 Reason:  Excluded by proposed incorporation 'entire'

These messages say that the version of the ub_javavm-incorporation package that is currently installed in this image is newer than the version specified by the pkg:/entire incorporation package that would be installed by the update operation.

The following command shows the version of the ub_javavm-incorporation package that is currently installed.

$ pkg list ub_javavm-incorporation
NAME (PUBLISHER)                                  VERSION                    IFO
consolidation/ub_javavm/ub_javavm-incorporation   0.5.11-0.175.2.0.0.13.0    i--

The following command shows the version of the ub_javavm-incorporation package that is specified by the pkg:/entire incorporation package to which the system attempted to update. The version of the pkg:/entire incorporation package to which the system attempted to update is copied from the first “Reject” message in the above output. The -r option looks for this package in the configured package repositories, not in the installed image.

$ pkg contents -Hrt depend \
-a facet.version-lock.consolidation/ub_javavm/ub_javavm-incorporation=true \
-o fmri entire@0.5.11,5.11-0.175.2.0.0.10.0
consolidation/ub_javavm/ub_javavm-incorporation@0.5.11-0.175.2.0.0.9.0

To fix this problem, you can instruct the update operation to update all installed packages except for particular specified packages. Use one or more --reject options in the pkg update command to perform the update without attempting to update the packages specified in the --reject options. Wildcards can be used in --reject arguments. In the following command, packages to reject are copied from the “Reject” messages above that precede the “Reason: Newer version is already installed” message.

$ pkg update -v --be-name s11.2 \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.151*' \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.175.0*' \
--reject 'consolidation/ub_javavm/ub_javavm-incorporation@0.5.11,5.11-0.175.2.0.0.9.0*'

Tip  - Be careful when you specify --reject arguments: Any packages that match the --reject argument that are already installed will be uninstalled.

Updating an Incorporation When an Installed Dependency is Not Permissible

Error messages:

  • The installed package package is not permissible

  • Excluded by proposed incorporation

If you receive these error messages, package probably is a core operating system package that must be kept in sync with other core operating system packages. Use the pkg facet command to check the value of the facet.version-lock.package facet. If the value of this version-lock facet is false, use the pkg change-facet command to change the value of this facet to true, and then try the update operation again.

Required Package Cannot Be Found

Error message: A version for 'require' dependency cannot be found

If you receive a message such as the following message that a required package cannot be found, check whether the package is available from your configured publishers.

pkg update: No solution was found to satisfy constraints
Plan Creation: Package solver has not found a solution to update to
latest available versions.
This may indicate an overly constrained set of packages are installed.
[output omitted]
No suitable version of required package package1 found:
Reject: package1
Reason: A version for 'require' dependency package2 cannot be found

Use the following command to show whether package2 is available from your configured package publishers:

$ pkg list -afv package2

Use the pkg publisher command to check your publisher origin location. The publisher of this package is given after pkg:// in the full FMRI. You might need to change your publisher origin location. If the location is a local package repository, you might need to update the repository.

Required Package is Rejected

Error messages:

  • No solution was found to satisfy constraints

  • All versions matching 'require' dependency package are rejected

In the following output from the pkg update command, the initial error message states that a suitable version of the required package desktop-incorporation cannot be found. The reason the desktop-incorporation package is not suitable is because one of its dependent packages is not found. Because no suitable version is found, the desktop-incorporation package is rejected. The pkg update fails because the desktop-incorporation package is required by the pkg:/entire incorporation. The following command shows that the desktop-incorporation package is required by the pkg:/entire incorporation:

$ pkg search -Hlo pkg.name require:consolidation/desktop/desktop-incorporation

The next error message states that a suitable version of the required package python-extra-26 cannot be found. The reason the python-extra-26 package is not suitable is because the python-extra-26 package requires the desktop-incorporation package, and no suitable version of desktop-incorporation was found.

This information shows that the solution to this update failure is to find a way to install the required version of the desktop-incorporation package.

pkg update: No solution was found to satisfy constraints

maintained incorporations:
  [output omitted]

Plan Creation: dependency error(s) in proposed packages:
  [output omitted]
  No suitable version of required package pkg://solaris/consolidation/desktop
/desktop-incorporation@0.5.11,5.11-0.175.2.0.0.26.0:20131028T145233Z found:
    Reject: pkg://solaris/consolidation/desktop/desktop-incorporation
@0.5.11,5.11-0.175.2.0.0.26.0:20131028T145233Z
    Reason: A version for 'incorporate' dependency on pkg:/library/python-2
/python-sexy-26@0.1.9-0.175.0.0.0.1.0 cannot be found
  No suitable version of required package pkg://solaris/library/python-2
/python-extra-26@2.6.4-0.175.1.0.0.15.0:201205014T200156Z found:
    Reject:  pkg://solaris/library/python-2/python-extra-26@
2.6.4-0.175.1.0.0.15.0:201205014T200156Z
    Reason: All versions matching 'require' dependency pkg:/consolidation
/desktop/desktop-incorporation are rejected
      Reject: pkg://solaris/consolidation/desktop/desktop-incorporation
@0.5.11,5.11-0.175.0.0.0.2.0:20111019T132128Z
  [output omitted]
pkg://solaris/consolidation/desktop/desktop-incorporation
@0.5.11,5.11-0.175.2.0.0.26.0:20131028T145233Z

The following commands show that the package that cannot be found for the required desktop-incorporation package is not required. The python-sexy-26 package is incorporated by the desktop-incorporation package, but it is not required.

$ pkg search -Hlo pkg.name require:library/python-2/python-sexy-26
$ pkg search -Hlo pkg.name incorporate:library/python-2/python-sexy-26
consolidation/desktop/desktop-incorporation

The incorporate dependency says that if the python-sexy-26 package is installed, it must be installed at the specified version. However, because no package requires the python-sexy-26 package, the python-sexy-26 package does not need to be installed. Therefore, one solution to this update failure is to uninstall the python-sexy-26 package. A different version of this package is currently installed, and the update could not locate the version specified by the desktop-incorporation incorporation. If you uninstall the package, the update process will not need to find the updated package.

If you need the python-sexy-26 package and do not want to uninstall it, find a package repository that provides pkg:/library/python-2 /python-sexy-26@0.1.9-0.175.0.0.0.1.0. Either use the pkg set-publisher command to add that repository to your publisher origin locations, or use the pkgrecv command to add that package to your currently set publisher origin.

Packages Are Not Updated as Expected

Error message: pkg update: The installed package package is not permissible.

If you use wildcards with an update operation, you might not see any error messages even though some packages that should have been updated were not updated. You might see an error message if you specify a package name without wildcards.

For example, the following operation might complete without error and yet not update any packages, even though you verified that newer packages are available from your configured publishers:

$ pkg update '*'

To get more information, instead of using the wildcard, specify the version of pkg:/entire to which you want to update:

$ pkg list -Hafv entire
pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.9.0:20130304T214506Z  ---
$ pkg update -nv pkg://solaris/entire@0.5.11,5.11-0.175.2.0.0.9.0:20130304T214506Z
Creating Plan (Solver setup): -
pkg update: The installed package compress/zip is not permissible.
  Reject:  pkg://solaris/compress/zip@3.0,5.11-0.175.2.0.0.7.0:20121119T070339Z
  Reason:  Excluded by proposed incorporation 'consolidation/userland/userland-incorporation'

In this example, the package compress/zip is preventing the update of the userland-incorporation incorporation package, which is preventing the update of the pkg:/entire incorporation. The following command displays more information about the compress/zip package:

$ pkg list compress/zip
NAME (PUBLISHER)  VERSION                   IFO
compress/zip      3.0-5.11-0.175.2.0.0.7.0  if-

This output shows that the compress/zip package is frozen. Because the package is frozen, it cannot be updated.

$ pkg unfreeze compress/zip
compress/zip was unfrozen.

With the compress/zip package unfrozen, the original pkg update '*' operation should update all packages in the image that have updates available. See Locking Packages to a Specified Version for more information about the pkg freeze and pkg unfreeze commands.

The pkg sync-linked error shown in Sync Linked Package Cannot Be Installed is similar but indicates a package in a non-global zone is preventing the update.

Sync Linked Package Cannot Be Installed

Error message: pkg sync-linked: The installed package package is not permissible.

A sync-linked package is a package in a non-global zone. You might see a package rejected with the reason being a version mismatch with the parent image.

Linked progress: -pkg: update failed (linked image exception(s)):

A 'sync-linked' operation failed for child 'zone:z1' with an unexpected
return value of 1 and generated the following output:

pkg sync-linked: The installed package package is not permissible.
  Reject:  package
  Reason:  Parent image has a incompatible newer version: package

You might receive this incompatibility message for the following reasons:

  • Core operating system packages must be the same version in non-global zones as in the global zone. You cannot update these packages separately in a non-global zone. Similarly, freezing any of these packages in a non-global zone causes the update to fail for the global zone and all non-global zones.

    The following command displays the list of packages that must remain in sync between the global zone and non-global zones:

    $ pkg search -o pkg.name :depend:parent:
  • If you are updating a BE that has zones configured, you cannot mount that BE and then use the pkg -R command to update that alternate BE (ABE) if the publisher configuration in the ABE is different from the publisher configuration in the currently booted BE. Non-global zones in the ABE use the publisher configuration from the currently active BE.

Non-Global Zone Cannot Be Installed

Error message: The following pattern(s) did not match any allowable packages. Try using a different matching pattern, or refreshing publisher information

Core operating system packages must be the same version in non-global zones as in the global zone. If the solaris publisher origin in this image is set to a package repository that does not contain the same versions of the system packages that are installed in the global zone, attempting to install a non-global zone results in the following error:

$ zoneadm -z myzone install
The following ZFS file system(s) have been created:
    rpool/export/zones/myzone
Progress being logged to /var/log/zones/zoneadm.20131104T181301Z.myzone.install
       Image: Preparing at /export/zones/myzone/root.

AI Manifest: /tmp/manifest.xml.9daq.i
SC Profile: /usr/share/auto_install/sc_profiles/enable_sci.xml
  Zonename: myzone
Installation: Starting ...

            Creating IPS image
Startup linked: 1/1 done
            Installing packages from:
                solaris
                    origin:  http://pkg.oracle.com/solaris/release/
            Error occurred during execution of 'generated-transfer-4606-1' checkpoint.
            Failed Checkpoints:

            Checkpoint execution error:

                The following pattern(s) did not match any allowable packages. Try
                using a different matching pattern, or refreshing publisher information:

Installation: Failed.  See install log at /system/volatile/install.4606/install_log
ERROR: auto-install failed.

To install a non-global zone, the repository that you set as the solaris publisher origin must contain at least the same system software that is installed in the global zone where you are installing the non-global zone. The repository can also contain older or newer software, but it must contain the same software that is installed in the global zone. The following command shows that the /export/IPSpkgrepos/Solaris repository is a suitable publisher origin for this global zone because this repository contains the same version of the pkg:/entire package that is installed in the global zone:

$ pkg list entire
NAME (PUBLISHER)      VERSION                   IFO
entire                0.5.11-0.175.2.0.0.26.0   i--
$ pkgrepo list -H -s /export/IPSpkgrepos/Solaris \
entire@0.5.11-0.175.2.0.0.26.0
solaris       entire       0.5.11-0.175.2.0.0.26.0:20131028T190148Z
$ pkg set-publisher -G '*' -M '*' -g /export/IPSpkgrepos/Solaris/ solaris

Image Cannot Be Modified

Error message: pkg: The image cannot be modified as it is currently in use by another package client

The error message should include the name and the pid of the client that has the image locked, as shown in the following example:

pkg: The image cannot be modified as it is currently in use by another package
client: pkg on cbusl0406l, pid 26604.

Try your pkg command again after the current package process exits (process 26604 in this example). If the process does not exit quickly, use ptree -a, for example, to begin to examine the process.

The package process that is currently operating on this image might be Update Manager checking whether updates are available. See Using Update Manager for more information about the Update Manager cron job and pkg/update service.

Files Were Salvaged

The following informational message is followed by the path of the files that were salvaged and the temporary location where the files were moved:

The following unexpected or editable files and directories were
salvaged while executing the requested package operation; they
have been moved to the displayed location in the image:

This is an informational message and can be ignored or acted upon as necessary.

Directories are reference-counted in IPS. When the last package installed in the image that either explicitly or implicitly references a directory no longer references that directory, that directory is removed. If that directory contains unpackaged file system objects, those items are moved into $IMAGE_META/lost+found. Unpackaged file system objects are files and directories that were not delivered by an IPS package. The value of IMAGE_META is typically /var/pkg. See the “Files” section of the pkg(5) man page for information about the IMAGE_META directory.

Minimize Stored Image Metadata

The /var/pkg directory holds metadata for the image. This directory can get quite large. Do not manually remove anything from the /var/pkg directory.

Make sure the flush-content-cache-on-success image property value is set to true. The value of the flush-content-cache-on-success property is true by default. When the value of flush-content-cache-on-success is true, cached files are removed when pkg install and pkg update operations complete successfully. If the flush-content-cache-on-success property is set to false, you can use the command shown in the following example to reset the value to true:

$ pkg property flush-content-cache-on-success
PROPERTY                       VALUE
flush-content-cache-on-success False
$ pkg set-property flush-content-cache-on-success true
$ pkg property -H flush-content-cache-on-success
flush-content-cache-on-success True

Flushing the content cache (setting flush-content-cache-on-success to true) can cause some pkg operations to take longer to complete.

Non-global zones have a different cache, which you can set with the -c option of /usr/lib/pkg.sysrepo. You can set the maximum size of this cache with the -s option. See the pkg.sysrepo(1M) man page.

Increase Package Installation Performance

The following steps can help increase package installation and update performance: