Go to main content

Adding and Updating Software in Oracle® Solaris 11.3

Exit Print View

Updated: September 2018
 
 

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 a constraint package. See Constraint Packages for information about constraint packages and version constraints.

Constraint packages 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 a constraint package. Instead, you should update the constraint 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.

See also Non-Global Zone Cannot Be Installed.

Updating a Package Constrained by a Constraint Package

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 a constraint package, best practice is to update the constraint package, keeping all of the constrained packages as a tested-together set.

If you still want to update just one package from a constraint package, 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 constraint package. 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 Constraint Packages.

Example 27  Unlock and Update 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 constraint 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 constraint 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 constraint package. To update the Java software without updating other software, unlock the version-lock facet of the Java constraint package and then update the Java constraint package. For more information about version-lock facets, see Relaxing Version Constraints Specified by Constraint Packages.

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 a Constraint Package When a Suitable Dependency Cannot Be Found

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

See Constraint Packages for information about constraint packages and their incorporate dependencies.

Examples of reasons a constraint package might fail to update include the following installation states of an incorporate dependency of the constraint 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 28  Update 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 constraint 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 constraint 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 constraint 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 constraint package to which the system attempted to update. The version of the pkg:/entire constraint 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 a Constraint Package 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 constraint package. The following command shows that the desktop-incorporation package is required by the pkg:/entire constraint package:

$ 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 constraint package. 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.