我试图安装Go(golang)在一个新的Solaris 11.3虚拟机(从Oracle下载),但我得到以下错误:
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/[email protected] Reason: No version matching 'require' dependency runtime/[email protected],5.11-5.12.0.0.0.90.0 can be installed ---------------------------------------- Reject: pkg://solaris/runtime/[email protected] Reason: No version matching 'optional' dependency runtime/[email protected],5.11-5.12.0.0.0.69.0 can be installed ---------------------------------------- Reject: pkg://solaris/runtime/[email protected] pkg://solaris/runtime/[email protected] Reason: This version is excluded by installed incorporation consolidation/userland/[email protected] ---------------------------------------- Reject: pkg://solaris/runtime/[email protected] Reason: No version matching 'optional' dependency runtime/[email protected],5.11-5.12.0.0.0.69.0 can be installed ----------------------------------------
一些谷歌search后,我终于跑了: pkg change-facet facet.version-lock.runtime/perl-512=false
,之后我才能够安装golang-15。 甜!!
有人可以解释我刚刚做了什么:)。 我知道这个问题听起来很奇怪,但是我在写作的时候设法解决了这个问题(我还没有弄清楚这个change-facet
)。 我仍然想要了解这个动作的含义。
可以(应该)我已经解决了这个不同?
当前版本的developer/golang-15
包依赖于Perl 5.22:
$ pkg contents -r -o fmri,type -t depend developer/golang-15 FMRI TYPE pkg:/runtime/[email protected] require pkg:/system/[email protected] require release/evaluation require
在你的情况下,它显然仍然依赖于Perl 5.20。 无论哪种方式,麻烦的是默认的Solaris 11.3安装与Perl 5.12。 由于其他软件包也对Perl运行时具有依赖性,因此系统会尝试locking此版本以防止损坏软件包。 这是通过称为“ 合并”的Solaris软件包pipe理function完成的。 组合软件包可防止OS软件包意外升级或降级。 但是,对于某些软件包,它将提供一个循环漏洞,以便pipe理员可以安装不同的版本。 通过设置facet.version-lock.runtime/perl-512=false
您有效地告诉Solaris释放Perl 5.12上的locking,并允许升级到更高版本。 在安装Golang之后,默认的Perl版本将从5.12更改为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
以下链接指向Oracle文档,更详细地说明了此function: http : //docs.oracle.com/cd/E26502_01/html/E28984/gmias.html