2012年5月30日星期三

No package nginx available. 一次解决一个问题

No package nginx available. 一次解决一个问题

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


解决方法

http://winhows.net/search/no-package-nginx-available-yum/

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

http://www.cyberciti.biz/faq/rhel-fedora-centos-linux-enable-epel-repo/

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

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

http://rpm.pbone.net/index.php3/stat/4/idpl/15297742/dir/fedora_6/com/epel-release-6-5.noarch.rpm.html

使用命令:

rpm -Uvh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/beta/6/i386/epel-release-6-5.noarch.rpm

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

Image(18)

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

Image(19)

Image(20)

[root@303914 downloads]# rpm -Uvh ftp://ftp.univie.ac.at/systems/linux/fedora/epel/beta/6/i386/epel-release-6-5.noarch.rpm

Retrieving ftp://ftp.univie.ac.at/systems/linux/fedora/epel/beta/6/i386/epel-release-6-5.noarch.rpm
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(LIB--> Processing Dependency: libxslt.so.1(LIB--> 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!


TAG: