2011-11-23 118 views
1

GCC似乎没有安装在我的Rhel 6.1机器上。此外,当我做的:在rhel 6.1上安装gcc

sudo yum install gcc 

它barfed:

Updating Red Hat repositories. 
Setting up Install Process 
No package gcc available. 
Error: Nothing to do 

同样的命令工作正常的RHEL 5.5。可能是什么问题呢?

更新:

sudo yum search gcc 

返回:

libgcc.x86_64 : GCC version 4.4 shared support library 
libgomp.x86_64 : GCC OpenMP v3.0 shared support library 

sudo yum grouplist 

返回:

Loaded plugins: product-id, subscription-manager 
Updating Red Hat repositories. 
Setting up Group Process 
Error: No group data available for configured repositories 


sudo yum install repolist 

返回:

Loaded plugins: product-id, subscription-manager 
Updating Red Hat repositories. 
Setting up Install Process 
No package repolist available. 
Error: Nothing to do 

更新2:

sudo yum repolist 

返回:

Loaded plugins: product-id, subscription-manager 
Updating Red Hat repositories. 
repolist: 0 
+0

奇。 'yum repolist'告诉你什么?那么'yum search gcc'呢?在CentOS 5.6上,我看到一个名为“gcc.i386”的包;也许这是你需要安装的那个。 –

+0

我已经更新了需要输出的问题 –

+0

'yum repolist',而不是'yum grouplist'。顺便说一句,我可能无法回答你的问题,但其他熟悉RHEL的人可能会提供额外的信息。 –

回答

1

我解决了这个由RHN开关(通常可用来源)CentOS的。

  1. 从RHEL中删除“yum-rhn-plugin”包,这用于检查在RHEL中激活的 。

rpm -e yum-rhn-plugin

  • 删除 “在redhat释放” 相关的包,这是用来检查 存储库的兼容性。通常我们不能删除这些包裹 ,因为它们被系统的其他包裹用于适当的 功能。所以我们将使用“--nodeps”参数强制删除系统中的 。
  • rpm -e redhat-release-notes-5Server redhat-release-5Server --nodeps

  • 下载&安装“的centos释放”涉及包,在我们通过删除“在redhat释放”所作的间隙填补 相关 包。
  • http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-5-11.el5.centos.i386.rpm http://mirror.centos.org/centos-5/5/os/i386/CentOS/centos-release-notes-5.11-0.i386.rpm

  • 要自动通知有关GUI的更新,在/etc/yum/yum-updatesd.conf添加下的一节 “#如何发送通知”
  • 以下

    dbus_listener = yes

    1. 要在CLI登录中更改操作系统名称,编辑/etc/issue。既然我们已经安装了“的CentOS释放”涉及包,操作系统名称会作为“CentOS版本5(决赛)”,所以删除它,然后键入:

    Red Hat Enterprise Linux Server release 5 (Tikanga)(或者你喜欢的任何名称)

    1. 现在运行;

    yum updates