博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
No package nginx available. |一次解决一个问题
阅读量:6885 次
发布时间:2019-06-27

本文共 6421 字,大约阅读时间需要 21 分钟。

No package nginx available.  |一次解决一个问题 今天在新买的vps上安装nginx时提示没有nginx的包可安装

问题现场

[root@localhost ~]# yum -y install nginx

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: centos.ustc.edu.cn
* base: centos.ustc.edu.cn
* extras: centos.ustc.edu.cn
* updates: data.nicehosting.co.kr
Setting up Install Process
No package nginx available.
Nothing to do 解决方法

在使用上述方法解决问题时发现,文中指示的 rpm包不可用,下载不了,404

上述地址中的方法肯定了必须要解决 EPEL才可以安装nginx,问题转为寻找一个可用的rpm包

问题转为:How Do I Enable EPEL Repo under CentOS or RHEL Servers?

使用命令:

rpm -Uvh

以上内容即可启用EPEL,之后再次yum install nginx即可安装!

最终在此找到大量可用的rpm再次按照链接1文中提到的方法,解决战斗!

[root@303914 downloads]# rpm -Uvh

Retrieving

warning: /var/tmp/rpm-tmp.xrqJSG: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]

[root@303914 downloads]# yum repolist

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                            |  12 kB     00:00    
* epel: mirrors.solfo.com
epel                                                     | 4.0 kB     00:00    
epel/primary_db                                          | 3.6 MB     00:01    
repo id             repo name                                             status
base                CentOS-6 - Base                                       4,764
epel                Extra Packages for Enterprise Linux 6 - i386          6,061
extras              CentOS-6 - Extras                                         4
updates             CentOS-6 - Updates                                      732
vz-base             vz-base                                                   3
vz-updates          vz-updates                                                0
repolist: 11,564

[root@303914 downloads]# yum install nginx

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* epel: mirrors.solfo.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nginx.i686 0:1.0.15-1.el6 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18) for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11) for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: libxslt.so.1 for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: libgd.so.2 for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: libexslt.so.0 for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: libGeoIP.so.1 for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: gd for package: nginx-1.0.15-1.el6.i686
--> Processing Dependency: GeoIP for package: nginx-1.0.15-1.el6.i686
--> Running transaction check
---> Package GeoIP.i686 0:1.4.8-1.el6 will be installed
---> Package gd.i686 0:2.0.35-10.el6 will be installed
--> Processing Dependency: libfontconfig.so.1 for package: gd-2.0.35-10.el6.i686
--> Processing Dependency: libX11.so.6 for package: gd-2.0.35-10.el6.i686
--> Processing Dependency: libXpm.so.4 for package: gd-2.0.35-10.el6.i686
--> Processing Dependency: libfreetype.so.6 for package: gd-2.0.35-10.el6.i686
---> Package libxslt.i686 0:1.1.26-2.el6 will be installed
--> Running transaction check
---> Package fontconfig.i686 0:2.8.0-3.el6 will be installed
---> Package freetype.i686 0:2.3.11-6.el6_2.9 will be installed
---> Package libX11.i686 0:1.3-2.el6 will be installed
--> Processing Dependency: libX11-common = 1.3-2.el6 for package: libX11-1.3-2.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.3-2.el6.i686
---> Package libXpm.i686 0:3.5.8-2.el6 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.3-2.el6 will be installed
---> Package libxcb.i686 0:1.5-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.5-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.5-1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================

Package             Arch         Version                   Repository     Size
================================================================================
Installing:
nginx               i686         1.0.15-1.el6              epel          381 k
Installing for dependencies:
GeoIP               i686         1.4.8-1.el6               epel          621 k
fontconfig          i686         2.8.0-3.el6               base          186 k
freetype            i686         2.3.11-6.el6_2.9          updates       363 k
gd                  i686         2.0.35-10.el6             base          141 k
libX11              i686         1.3-2.el6                 base          585 k
libX11-common       noarch       1.3-2.el6                 base          188 k
libXau              i686         1.0.5-1.el6               base           22 k
libXpm              i686         3.5.8-2.el6               base           58 k
libxcb              i686         1.5-1.el6                 base          104 k
libxslt             i686         1.1.26-2.el6              base          448 k

Transaction Summary

================================================================================
Install      11 Package(s)

Total download size: 3.0 M

Installed size: 10 M
Is this ok [y/N]: y
Downloading Packages:
(1/11): GeoIP-1.4.8-1.el6.i686.rpm                       | 621 kB     00:00    
(2/11): fontconfig-2.8.0-3.el6.i686.rpm                  | 186 kB     00:00    
(3/11): freetype-2.3.11-6.el6_2.9.i686.rpm               | 363 kB     00:00    
(4/11): gd-2.0.35-10.el6.i686.rpm                        | 141 kB     00:00    
(5/11): libX11-1.3-2.el6.i686.rpm                        | 585 kB     00:01    
(6/11): libX11-common-1.3-2.el6.noarch.rpm               | 188 kB     00:00    
(7/11): libXau-1.0.5-1.el6.i686.rpm                      |  22 kB     00:00    
(8/11): libXpm-3.5.8-2.el6.i686.rpm                      |  58 kB     00:00    
(9/11): libxcb-1.5-1.el6.i686.rpm                        | 104 kB     00:00    
(10/11): libxslt-1.1.26-2.el6.i686.rpm                   | 448 kB     00:00    
(11/11): nginx-1.0.15-1.el6.i686.rpm                     | 381 kB     00:00    
--------------------------------------------------------------------------------
Total                                           367 kB/s | 3.0 MB     00:08    
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
Userid : EPEL (6) <epel@fedoraproject.org>
Package: epel-release-6-5.noarch (installed)
From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : freetype-2.3.11-6.el6_2.9.i686                              1/11
  Installing : libX11-common-1.3-2.el6.noarch                              2/11
  Installing : fontconfig-2.8.0-3.el6.i686                                 3/11
  Installing : GeoIP-1.4.8-1.el6.i686                                      4/11
  Installing : libxslt-1.1.26-2.el6.i686                                   5/11
  Installing : libXau-1.0.5-1.el6.i686                                     6/11
  Installing : libxcb-1.5-1.el6.i686                                       7/11
  Installing : libX11-1.3-2.el6.i686                                       8/11
  Installing : libXpm-3.5.8-2.el6.i686                                     9/11
  Installing : gd-2.0.35-10.el6.i686                                      10/11
  Installing : nginx-1.0.15-1.el6.i686                                    11/11

Installed:

  nginx.i686 0:1.0.15-1.el6                                                    

Dependency Installed:

  GeoIP.i686 0:1.4.8-1.el6               fontconfig.i686 0:2.8.0-3.el6        
  freetype.i686 0:2.3.11-6.el6_2.9       gd.i686 0:2.0.35-10.el6              
  libX11.i686 0:1.3-2.el6                libX11-common.noarch 0:1.3-2.el6     
  libXau.i686 0:1.0.5-1.el6              libXpm.i686 0:3.5.8-2.el6            
  libxcb.i686 0:1.5-1.el6                libxslt.i686 0:1.1.26-2.el6          

Complete!

转载于:https://www.cnblogs.com/kkun/archive/2012/05/30/2526146.html

你可能感兴趣的文章
Javascript创建对象的7种模式
查看>>
Shell工作笔记01
查看>>
项目、软件开发过程中版本术语
查看>>
CSS实现背景透明,文字不透明(各浏览器兼容)
查看>>
【转】[大学引导]超级链接、字体颜色、音乐播放公式
查看>>
T-SQL中INSERT、UPDATE
查看>>
Linux下Nginx服务器配置Modsecurity实现Web应用防护系统
查看>>
openSUSE13.2安装ruby和rails
查看>>
python 高级函数
查看>>
F.Cards with Numbers
查看>>
简单入门Buffer
查看>>
OO第四阶段总结
查看>>
javascript总结02
查看>>
创建windows服务
查看>>
HTML5 入门基础
查看>>
【转载】读懂IL代码就这么简单(二)
查看>>
C++文件操作(fstream)
查看>>
用main函数传参做简单的计算器的代码
查看>>
python中struct.unpack的用法
查看>>
体绘制(Volume Rendering)概述之4:光线投射算法(Ray Casting)实现流程和代码(基于CPU的实现)...
查看>>