yum安装时提示No package xxx available,解决办法

简介:

具体原因:使用yum搜索某些rpm包,找不到包是因为CentOS是RedHat企业版编译过来的,去掉了所有关于版权问题的东西。安装EPEL后可以很好的解决这个问题。EPEL(Extra Packages for Enterprise Linux )即企业版Linux的扩展包,提供了很多可共Centos使用的组件,安装完这个以后基本常用的rpm都可以找到。

Method #1  从企业版Linux库配置包中安装扩展包。(推荐 )

 

?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[root@localhost ~] # 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:

?
1
2
[root@localhost ~] # cd/tmp
[root@localhost ~] # wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm ls*.rpm

或者通过wiki查找到对应版本的epel后,再下载:

 

?
1
2
3
[root@localhost ~] # wget http://dl.fedoraproject.org/pub/epel/7/x86_64/epel-release-7-5.noarch.rpm 
[root@localhost ~] # wget http://mirrors.ustc.edu.cn/fedora/epel/7/x86_64/epel-release-7-5.noarch.rpm //中国科学技术大学镜像

 

2.安装:

?
1
[root@localhost ~] # 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身份执行)












本文转自浅景尘51CTO博客,原文链接:http://blog.51cto.com/857803451/1964363 ,如需转载请自行联系原作者



相关文章
|
21天前
|
Linux C语言
linux yum安装ffmpeg 图文详解
linux yum安装ffmpeg 图文详解
43 0
|
21天前
|
Linux
linux yum 安装rar和unrar
linux yum 安装rar和unrar
66 0
|
5月前
|
Linux
解决CentOS yum安装Mysql8提示“公钥尚未安装”或“密钥已安装,但是不适用于此软件包”的问题
解决CentOS yum安装Mysql8提示“公钥尚未安装”或“密钥已安装,但是不适用于此软件包”的问题
1559 0
|
7天前
|
Linux
centos 6.5安装yum
centos 6.5安装yum
34 0
|
8天前
|
存储 Linux 网络安全
centos7使用yum网络安装
这些是使用Yum进行网络安装的基本步骤。根据你的需求,你可以重复步骤3和4来安装其他软件包。请注意,执行Yum操作需要root或具有sudo权限的用户。
32 1
|
12天前
|
应用服务中间件 nginx
yum 安装报错 No package nginx available Error:Nothing to do
yum 安装报错 No package nginx available Error:Nothing to do
37 1
|
21天前
|
关系型数据库 MySQL Linux
CentOS 7 下使用yum安装MySQL5.7.20 最简单 图文详解
CentOS 7 下使用yum安装MySQL5.7.20 最简单 图文详解
89 0
|
1月前
|
Linux
Linux: yum查看、安装、删除软件包
Linux: yum查看、安装、删除软件包
32 0
|
5月前
|
Linux
Centos8安装yum源时候出现的异常问题及解决方案(保好使)
Centos8安装yum源时候出现的异常问题及解决方案(保好使)
|
2月前
|
Linux Shell
Linux:centos yum安装指令指南
Linux:centos yum安装指令指南
174 0
Linux:centos yum安装指令指南