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

  • Framework error: code: E_COULDNT_CONNECT (7) reason: Failed to connect

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.

If the image has non-global zones, see the instructions for non-global zones in Location Not Found.