我是靠谱客的博主 冷艳大象,最近开发中收集的这篇文章主要介绍yum install 故障记录,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

今天在安装 yum install nethogs 的时候,总是提示错误。

[root@localhost yum.repos.d]# yum install nethogs
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
 * base: mirror.bit.edu.cn
 * extras: mirrors.163.com
 * updates: mirrors.163.com
base                                                                                          | 3.7 kB     00:00     
base/primary_db                                                                               | 3.7 MB     00:01     
extras                                                                                        | 3.3 kB     00:00     
extras/primary_db                                                                             |  21 kB     00:00     
updates                                                                                       | 3.4 kB     00:00     
updates/primary_db                                                                            | 6.8 MB     00:02     
No package nethogs available.
Error: Nothing to do

最后,打开 /etc/yum.repos.d/   ll命令后发现没有epel的源,就下载了epel的源

wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -ivh 它就行了。
[root@localhost yum.repos.d]# ll
total 44
-rw-r--r--. 1 root root  1926 Jun 26  2012 CentOS-Base.repo
-rw-r--r--  1 root root  2572 Jul  2  2014 CentOS-Base.repo1
-rw-r--r--. 1 root root   637 Jun 26  2012 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root   626 Jun 26  2012 CentOS-Media.repo
-rw-r--r--. 1 root root  2593 Jun 26  2012 CentOS-Vault.repo
-rw-r--r--  1 root root 14540 Nov  5  2012 epel-release-6-8.noarch.rpm
-rw-r--r--  1 root root   957 Nov  5  2012 epel.repo
-rw-r--r--  1 root root  1056 Nov  5  2012 epel-testing.repo


在rpm安装的时候,出现个问题,我的电脑上装了有个高版本的epel,如下所示:epel 7.5已安装,想在/etc/yum.repos.d下生成的文件与6.8的矛盾,所以需要卸载7.5

yum repolist是查看 有哪些源,可以看到还没有安装epel源

[root@localhost yum.repos.d]# rpm -ivh epel-release-6-8.noarch.rpm 
warning: epel-release-6-8.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
        package epel-release-7-5.noarch (which is newer than epel-release-6-8.noarch) is already installed
        file /etc/yum.repos.d/epel-testing.repo from install of epel-release-6-8.noarch conflicts with file from package epel-release-7-5.noarch
        file /etc/yum.repos.d/epel.repo from install of epel-release-6-8.noarch conflicts with file from package epel-release-7-5.noarch
[root@localhost yum.repos.d]# yum repolist
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.bit.edu.cn
 * extras: mirrors.sohu.com
 * updates: mirrors.sohu.com
repo id                                           repo name                                                    status
base                                              CentOS-6 - Base                                              5,079
extras                                            CentOS-6 - Extras                                               20
updates                                           CentOS-6 - Updates                                             974
repolist: 6,073
[root@localhost yum.repos.d]# ll

检查安装的rpm包 

[root@localhost yum.repos.d]# rpm -qa | grep epel
epel-release-7-5.noarch

卸载,即可。

[root@localhost yum.repos.d]# rpm -e epel-release-7-5.noarch
error: Failed dependencies:
        epel-release >= 7 is needed by (installed) webtatic-release-7-3.noarch
[root@localhost yum.repos.d]# rpm -e webtatic-release-7-3.noarch
[root@localhost yum.repos.d]# rpm -e epel-release-7-5.noarch 

最后

以上就是冷艳大象为你收集整理的yum install 故障记录的全部内容,希望文章能够帮你解决yum install 故障记录所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(60)

评论列表共有 0 条评论

立即
投稿
返回
顶部