在 RHEL 5 中,yum 找不到包(python-devel)

在 RHEL 5 中,yum 找不到包(python-devel)

在工作中,我需要在一台特定服务器上使用 Red Hat Enterprise Linux (RHEL) 版本 5。我对 Linux 有经验,但对 RHEL 了解不多(对 Debian 和 Ubuntu 了解较多)。

我想安装 gitosis,但是 gitosis 的 EPEL 包依赖于 python-setuptools;而 python-setuptools 又依赖于 python-devel。

yum 找不到 python-devel。

EPEL 中似乎没有 python-devel。这让我相信它可能直接在 RHEL 5 中受支持;也许 EPEL 没有提供它,因为它是 RHEL 的一部分?

通过 pbone.net 上的 RPM 搜索进行检查,我发现 Centos 有一个 python-devel 包,这再次让我认为 python-devel 应该由 RHEL 提供。

服务器上的 yum.conf 文件有一个 [main] 条目,其中包含“distroverpkg=redhat-release”行。目录“yum.repos.d”包含以下存储库文件:epel.repo epel-testing.repo rhel-debuginfo.repo

python-devel 应该放在“redhat-release”存储库中吗?我是否应该将其他官方 RHEL 存储库包含在我的 yum 配置中?

谢谢你的帮助。


附加信息:这是命令的输出yum repolist all


# yum repolist all
Loaded plugins: rhnplugin, security
repo id                repo name                                  status
epel                   Extra Packages for Enterprise Linux 5 - i3 enabled: 3,423
epel-debuginfo         Extra Packages for Enterprise Linux 5 - i3 disabled
epel-source            Extra Packages for Enterprise Linux 5 - i3 disabled
epel-testing           Extra Packages for Enterprise Linux 5 - Te disabled
epel-testing-debuginfo Extra Packages for Enterprise Linux 5 - Te disabled
epel-testing-source    Extra Packages for Enterprise Linux 5 - Te disabled
rhel-debuginfo         Red Hat Enterprise Linux 5Client - i386 -  disabled
rhel-i386-client-5     Red Hat Enterprise Linux Desktop (v. 5 for enabled: 5,025
repolist: 8,448

有趣的是,这台计算机似乎没有 rhel-i386-server-5 作为存储库。这算是python-devel服务器软件包吗?有人能告诉我如何启用服务器存储库吗?

我寻找一些设置来启用此功能,但我所能找到的只是/etc/yum/pluginconf.d/rhnplugin.conf包含以下内容的文件:


[main]
enabled = 1
gpgcheck = 1

[rhel-i386-server-5]
enabled = 1

编辑以添加其他信息:


# yum install gitosis
Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gitosis.noarch 0:0.2-6.20080825git.el5 set to be updated
--> Processing Dependency: python-setuptools for package: gitosis
--> Running transaction check
---> Package python-setuptools.noarch 0:0.6c7-1.el5 set to be updated
--> Processing Dependency: python-devel for package: python-setuptools
--> Finished Dependency Resolution
python-setuptools-0.6c7-1.el5.noarch from epel has depsolving problems
  --> Missing Dependency: python-devel is needed by package python-setuptools-0.6c7-1.el5.noarch (epel)
Error: Missing Dependency: python-devel is needed by package python-setuptools-0.6c7-1.el5.noarch (epel)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest

由于已请求,因此输出yum search python | grep -i devel


# yum search python | grep -i devel
TurboGears.noarch : Back-to-front web development in Python
kobo.noarch : Python modules for tools development
nettle-devel.i386 : Development headers for a low-level cryptographic library
postgresql-python.i386 : Development module for Python code to access a
python-cherrypy.noarch : A pythonic, object-oriented web development framework
python-tools.i386 : A collection of development tools included with Python.
python-tunepimp.i386 : Python bindings for developing programs that will use
wxPython-devel.i386 : Development files for wxPython add-on modules

答案1

好的,我们联系了 Red Hat 支持并得到了答复。

python-devel 包位于 RHEL Desktop Workstation 子频道(“rhel-i386-client-workstation-5”)中,该频道尚未启用。

默认情况下,主通道(“核心组件”、“rhel-i386-client-5”)已启用,但没有子通道。通过使用 Web 浏览器并登录到您的 Red Hat Network 帐户,您可以调出系统的记录并启用子通道。此过程在此知识库页面中描述:http://kbase.redhat.com/faq/docs/DOC-11313

答案2

看来您安装的是 RHEL Desktop,而不是 Server 版本。存储库包含在 RHN 中。检查我的服务器中“yum repolist all”的输出:

rhel-x86_64-server-5 Red Hat Enterprise Linux (v. 5 for 64-bi enabled: 

但是,必须包含 python-devel 包在桌面版中。结果是什么:

yum search python | grep -i devel

相关内容