yum安装时提示No package xxx available,解决办法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了yum安装时提示No package xxx available,解决办法相关的知识,希望对你有一定的参考价值。
具体原因:使用yum搜索某些rpm包,找不到包是因为CentOS是RedHat企业版编译过来的,去掉了所有关于版权问题的东西。安装EPEL后可以很好的解决这个问题。EPEL(Extra Packages for Enterprise Linux )即企业版Linux的扩展包,提供了很多可共Centos使用的组件,安装完这个以后基本常用的rpm都可以找到。
Method #1 从企业版Linux库配置包中安装扩展包。(推荐 )
[[email protected] ~]# sudo yum install epel-release Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:7-5 will be installed --> Finished Dependency Resolution Dependencies Resolved ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: epel-release noarch 7-5 extras 14 k Transaction Summary ================================================================================ Install 1 Package Total download size: 14 k Installed size: 24 k Is this ok [y/d/N]: y Downloading packages: epel-release-7-5.noarch.rpm | 14 kB 00:01 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-5.noarch 1/1 Verifying : epel-release-7-5.noarch 1/1 Installed: epel-release.noarch 0:7-5 Complete!
Method #2 从dl.fedoraproject.org安装扩展包。
1.使用wget命令下载epel-release:
[[email protected] ~]# cd/tmp [[email protected] ~]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ls*.rpm
或者通过wiki查找到对应版本的epel后,再下载:
[[email protected] ~]# wget http://dl.fedoraproject.org/pub/epel/7/x86_64/epel-release-7-5.noarch.rpm 或 [[email protected] ~]# wget http://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/epel-release-7-5.noarch.rpm //中国科学技术大学镜像
2.安装:
[[email protected] ~]# sudo yum install epel-release-7.noarch.rpm
注意:
1. epel的版本要与centos的版本相对应,否则安装失败,即centos7版本要对应epel7版本。
2. rpm安装完后,rpm -ql epel*,确提示未安装,此时要导入rpm的签名信息
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 (root身份执行)
本文出自 “浅景尘” 博客,请务必保留此出处http://857803451.blog.51cto.com/12777961/1964363
以上是关于yum安装时提示No package xxx available,解决办法的主要内容,如果未能解决你的问题,请参考以下文章
yum安装iostat命令时,提示No package iostat available. 错误:无须任何处理
linux用yum安装vim失败提示no package vimrc available是怎么回事?
yum安装提示错误“Error downloading packages: 32:bind-chroot-9.9.4-14.el7.x86_64: [Errno 256] No more mirr
解决CentOS出现"No package redis available"提示问题
linux新手按照菜鸟教程安装的CentOS6.8,用yum指令安装wget时报no package wget available。