在Oracle Solaris 11上安装GCC [英] Installing GCC on Oracle Solaris 11

查看:166
本文介绍了在Oracle Solaris 11上安装GCC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的虚拟机上测试了一些Oracle Solaris测试代码,我无法安装gcc,因为我真的不知道如何,我使用了很多,但所有信息都是关于oracle编译器的,我需要GCC,任何想法都可以在哪里我得到GCC或如何安装它?



谢谢

解决方案

原始答案适用于Solaris 11 Express /非官方版本 - 如果您今天正在使用完整版本的Solaris 11.x,请使用 pkg install 命令,就像您在 xavier 中看到的一样。



从你的终端运行这个命令来安装GCC。



对于GCC 3.4.x

  pkg install gcc-3 

对于GCC 4.5.x

  pkg install gcc-45 

对于GCC 4.7.x

  pkg install gcc-47 

对于GCC 4.8.x

  pkg install gcc-48 

gcc 命令应该已经存放在你的路径 / usr / bin / gcc 中,这是




旧回复
Solaris 11应该已经在 / usr / sfw / bin / 中安装了gcc,但它可能不在您的 PATH 中。在提示符下试试: / usr / sfw / bin / gcc


i recently got Oracle Solaris on my VM to test some code on it, i was unable to install gcc since i dont really know how, i googled alot but all info is about oracle compilers, i needed GCC, any idea where can i get GCC or how to install it?

thanks

解决方案

The original answer applied to Solaris 11 Express/non-official release - if you're doing this today with a full release of Solaris 11.x, use the pkg install command like you see in xavier's response.

Run this command from your terminal to install GCC.

For GCC 3.4.x

pkg install gcc-3

For GCC 4.5.x

pkg install gcc-45

For GCC 4.7.x

pkg install gcc-47

For GCC 4.8.x

pkg install gcc-48

The gcc command should then already be placed in your path /usr/bin/gcc, which is a symlink).


Old Answer Solaris 11 should already have gcc installed in /usr/sfw/bin/, but it's probably not in your PATH. Try this at the prompt: /usr/sfw/bin/gcc

这篇关于在Oracle Solaris 11上安装GCC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆