GCC似乎没有安装在我的Rhel 6.1机器上。另外,当我做的时候:
sudo yum install gcc
禁止了:
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 :(得分:1)
我通过从rhn切换到(更常见的来源)centos来解决这个问题。
rpm -e yum-rhn-plugin
rpm -e redhat-release-notes-5Server redhat-release-5Server --nodeps
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
/etc/yum/yum-updatesd.conf
中添加以下“#how to send notifications”部分 dbus_listener = yes
/etc/issue
。由于我们已经安装了“centos-release”相关软件包,因此操作系统名称将作为“CentOS版本5(最终版)”,因此请删除它并输入: Red Hat Enterprise Linux Server release 5 (Tikanga)
(或您喜欢的任何名字)
yum updates