无法在RHEL上安装任何东西

问题描述 投票:7回答:5

我正在使用新的RHEL系统。

我似乎无法通过yum install安装任何软件包。

yum install nmap

目前的回购

ls /etc/yum.repos.d/
google-chrome.repo  redhat.repo         rhel-source.repo

怎么可能出错?

YUM安装的输出:

$ sudo yum install nmap
[sudo] password for user: 
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Setting up Install Process
No package nmap available.
Error: Nothing to do
linux yum rhel
5个回答
9
投票

Red Hat不会将/etc/yum.repos.d目录用于官方软件包,因此答案不会在那里。它将使用/etc/yum/pluginconf.d中的订阅插件。

您提到RHEL主机是新的。您需要确保您的订阅有效,否则yum将无声地失败。

您可以使用subscription-manager list命令获取有关订阅的信息。


1
投票

尝试使用yum list在搜索中“搜索”正确的包名称

yum list nmap

我想正确的包名和安装命令是:

yum install nmap.x86_64

你也可以做一个“yum search somename”


0
投票

如果您的实验室或任何位置都有操作系统映像,则可以尝试使用某个RPMS

vim /etc/yum.repos.d/rhel.repo
[rhel]
name=rhel
baseurl=http://172.25.5.25/osimages/rhel7.2_64bit
enabled=1
gpgcheck=0

然后做yum clean all

baseurl是您的操作系统映像可用的位置。不需要订阅,它正在重用您的操作系统映像


0
投票

Centos已经为您完成了。

在/etc/yum.repos.d中创建一个repo文件

vi /etc/yum.repos.d/myrepo.repo

然后将其粘贴到此文件中:

[centos]
name=CentOS-7
baseurl=http://ftp.heanet.ie/pub/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=http://ftp.heanet.ie/pub/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

用wq保存!现在运行

yum repolist

检查是否可以安装任何软件包(例如nmap)

yum install nmap -y

请享用!!!


0
投票

就我而言,我试图用yum安装OpenJDK; sudo yum install -y java-1.8.0-openjdk-devel但收到一条错误消息,指出依赖项不可用:

---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.201.b09-1.el6_10 will be installed
--> Processing Dependency: pcsc-lite-devel(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64
--> Finished Dependency Resolution
Error: Package: 1:java-1.8.0-openjdk-headless-1.8.0.201.b09-1.el6_10.x86_64 (rhel-6-server-rpms)
           Requires: pcsc-lite-devel(x86-64)
**********************************************************************
yum can be configured to try to resolve such errors by temporarily enabling
disabled repos and searching for missing dependencies.
To enable this functionality please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf
**********************************************************************

我按照please set 'notify_only=0' in /etc/yum/pluginconf.d/search-disabled-repos.conf的建议解决了这个问题,然后再次运行了yum命令。这次yum加载了一堆[以前禁用]的回购并通过它们搜索,最后报告成功和此消息:

*******************************************************************
Dependency resolving was successful thanks to enabling these repositories:
rhel-6-server-optional-rpms
*******************************************************************

所以没有忽略*-devel回购,但仍然这样做。为清除,明确忽略的回购是:ignored_repos=*debug-rpms *source-rpms *beta-rpms

..那么有效,但我对这个机制仍然没有明智的..

© www.soinside.com 2019 - 2024. All rights reserved.