我需要在已部署到客户网络的 SPARC T4-1 (Solaris 11) 机器上编译一个 C 程序,它不再可以访问 Internet。本来在安装过程中,编译工具,也没有安装系统头文件,现在编译C程序时遇到了麻烦。
我已经按照 Internet 上的说明安装了一个本地存储库,pkg pubisher现在显示:
# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online file:///export/repoSolaris11/repo/
Run Code Online (Sandbox Code Playgroud)
但是,如果我尝试安装 gcc(gcc-dev我认为是package ?),我会收到来自包管理器 ( This version is excluded by installed incorporation)的一堆抱怨,我得出的结论是,它最初是工厂安装的(机器来自 Oracle,它没有被触及),现在我尝试添加一个本地存储库,但版本不匹配。完整的安装尝试:http : //pastebin.com/m3wazmU7
我想到了另一种安装 C 编译器的方法是 Solaris Studio IDE(在 DVD 上),我cc现在在机器上,但它缺少系统头文件,所以我什至无法编译一个简单的 hello world。尝试将system/headers结果安装到与 gcc-dev 非常相似的位置:
sudo pkg install system/header
Creating Plan /
pkg install: No matching version of system/header can be installed:
Reject: pkg://solaris/system/header@0.5.11,5.11-0.175.1.0.0.24.2:20120919T184855Z
Reason: …Run Code Online (Sandbox Code Playgroud)