【问题标题】:Installing gcc on rhel 6.1 [closed]在 rhel 6.1 上安装 gcc [关闭]
【发布时间】:2012-01-05 04:28:09
【问题描述】:

我的 Rhel 6.1 机器上似乎没有安装 GCC。另外,当我这样做时:

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

【问题讨论】:

  • 奇数。 yum repolist 告诉你什么? yum search gcc 呢?在 CentOS 5.6 上,我看到一个名为“gcc.i386”的包;也许这就是您需要安装的。
  • 我已经用需要的输出更新了问题
  • yum repolist,而不是yum grouplist。顺便说一句,我可能无法回答您的问题,但更熟悉 RHEL 的其他人可能会提供更多信息。
  • yum repolist, 不是 yum install repolist
  • 我已经用 yum repolist 的输出更新了它

标签: c gcc compiler-construction rhel


【解决方案1】:

我通过从 rhn 切换到(更常用的来源)centos 解决了这个问题。

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

rpm -e yum-rhn-plugin

  1. 删除“redhat-release”相关包,这个是用来检查的 存储库兼容性。通常我们不能删除这些包 因为它们被系统的其他软件包用于正确 功能。所以我们将使用“--nodeps”参数来强制删除 它们来自系统。

rpm -e redhat-release-notes-5Server redhat-release-5Server --nodeps

  1. 下载安装“centos-release”相关包,填写 在我们通过删除“redhat-release”相关的空白中 包。

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

  1. 要在 GUI 中自动通知更新,请在 /etc/yum/yum-updatesd.conf 的“# 如何发送通知”部分下添加以下内容

dbus_listener = yes

  1. 要在 CLI 登录中更改操作系统名称,请编辑 /etc/issue。由于我们已经安装了“centos-release”相关的软件包,操作系统名称将是“CentOS release 5 (Final)”,所以删除它并输入:

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

  1. 现在运行;

yum updates

【讨论】:

    猜你喜欢
    • 2012-01-04
    • 1970-01-01
    • 2018-04-20
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 1970-01-01
    • 2020-09-15
    • 2021-09-10
    相关资源
    最近更新 更多