1

I was trying to install Go (golang) on a newly minted Solaris 11.3 VM (downloaded from Oracle), but I was getting the following error:

root@solaris:/export/home/jdeppe# pkg install golang-15
Creating Plan (Running solver): /
pkg install: No matching version of developer/golang-15 can be installed:
  Reject:  pkg://solaris/developer/golang-15@1.5-5.12.0.0.0.95.0
  Reason:  No version matching 'require' dependency runtime/perl-520@5.20.1,5.11-5.12.0.0.0.90.0 can be installed
    ----------------------------------------
    Reject:  pkg://solaris/runtime/perl-520@5.20.1-5.12.0.0.0.90.0
    Reason:  No version matching 'optional' dependency runtime/perl-512@5.12.5,5.11-5.12.0.0.0.69.0 can be installed
      ----------------------------------------
      Reject:  pkg://solaris/runtime/perl-512@5.12.5-5.12.0.0.0.90.0
               pkg://solaris/runtime/perl-512@5.12.5-5.12.0.0.0.95.0
      Reason:  This version is excluded by installed incorporation consolidation/userland/userland-incorporation@0.5.11-0.175.3.1.0.3.0
      ----------------------------------------
    Reject:  pkg://solaris/runtime/perl-520@5.20.1-5.12.0.0.0.95.0
    Reason:  No version matching 'optional' dependency runtime/perl-512@5.12.5,5.11-5.12.0.0.0.69.0 can be installed
    ----------------------------------------

After some googling I finally ran: pkg change-facet facet.version-lock.runtime/perl-512=false, after which I was able to install golang-15. Sweet!!

Can someone explain what I just did :). I know this question sounds weird, but I managed to solve it as I was writing it (I hadn't figured out the change-facet stuff). I'd still like to understand the implications of this action.

Could (should) I have solved this differently?

Jens D
  • 121
  • 3

1 Answers1

5

The current version of the developer/golang-15 package has a dependency on Perl 5.22:

$ pkg contents -r -o fmri,type -t depend developer/golang-15
FMRI                                         TYPE
pkg:/runtime/perl-522@5.22.1-5.12.0.0.0.95.0 require
pkg:/system/library@0.5.11-0.175.3.1.0.3.0   require
release/evaluation                           require

In your case it apparently was still dependent on Perl 5.20. Either way, the trouble is that the default Solaris 11.3 installation comes with Perl 5.12. Since other packages have a dependency on the Perl runtime as well, the system tries to lock in this version to prevent broken packages. This is done through a Solaris package management feature called Incorporations. The incorporation package serves to prevent unintended upgrades or downgrades of OS packages. However, for certain packages it will provide a loop hole so the administrator can install a different version. By setting facet.version-lock.runtime/perl-512=false you effectively told Solaris to release the lock on Perl 5.12, and allow an upgrade to a later version. Subsequent to the Golang install, your default Perl version will change from 5.12 to 5.22:

$ perl --version

This is perl 5, version 22, subversion 1 (v5.22.1) built for i86pc-solaris-thread-multi-64

Copyright 1987-2015, Larry Wall

Here is a link to the Oracle documentation that explains this feature in more detail: http://docs.oracle.com/cd/E26502_01/html/E28984/gmias.html

Michael G
  • 51
  • 1
  • 3