Centos

在 CentOS 6.3 上安裝 lighttpd yum 404 錯誤

  • August 18, 2012

我有一個 CentOS 6.3 x86_64 伺服器,我正在嘗試安裝 lighttpd。我已經使用以下命令在伺服器上安裝了 EPEL 儲存庫:

rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm

然後我嘗試使用以下命令安裝 lighttpd:

yum install lighttpd lighttpd-fastcgi

該命令輸出以下內容:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* Webmin: download.webmin.com
* base: ftp.usf.edu
* epel: mirrors.rit.edu
* extras: ftp.usf.edu
* updates: ftp.usf.edu
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package lighttpd.x86_64 0:1.4.31-1.el5 will be installed
--> Processing Dependency: libssl.so.6()(64bit) for package: lighttpd-1.4.31-1.el5.x86_64
--> Processing Dependency: libldap-2.3.so.0()(64bit) for package: lighttpd-1.4.31-1.el5.x86_64
--> Processing Dependency: liblber-2.3.so.0()(64bit) for package: lighttpd-1.4.31-1.el5.x86_64
--> Processing Dependency: libcrypto.so.6()(64bit) for package: lighttpd-1.4.31-1.el5.x86_64
---> Package lighttpd-fastcgi.x86_64 0:1.4.31-1.el5 will be installed
--> Processing Dependency: spawn-fcgi for package: lighttpd-fastcgi-1.4.31-1.el5.x86_64
--> Running transaction check
---> Package compat-openldap.x86_64 1:2.3.43-2.el6 will be installed
---> Package openssl098e.x86_64 0:0.9.8e-17.el6.centos.2 will be installed
---> Package spawn-fcgi.x86_64 0:1.6.3-1.el5 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================================
Package                         Arch                  Version                                Repository           Size
========================================================================================================================
Installing:
lighttpd                        x86_64                1.4.31-1.el5                           epel                331 k
lighttpd-fastcgi                x86_64                1.4.31-1.el5                           epel                 45 k
Installing for dependencies:
compat-openldap                 x86_64                1:2.3.43-2.el6                         base                159 k
openssl098e                     x86_64                0.9.8e-17.el6.centos.2                 base                761 k
spawn-fcgi                      x86_64                1.6.3-1.el5                            epel                 16 k

Transaction Summary
========================================================================================================================
Install       5 Package(s)

Total size: 1.3 M
Total download size: 391 k
Installed size: 3.7 M

然後它會嘗試下載包:

Downloading Packages:
http://mirrors.rit.edu/epel/6/x86_64/lighttpd-1.4.31-1.el5.x86_64.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.

當實際的真實文件是http://mirrors.rit.edu/epel/6/x86_64/lighttpd-1.4.31時,它正在嘗試下載 lighttpd-1.4.31-1.el5.x86_64.rpm(el5 rpm)-1.el6.x86_64.rpm el6 rpm。如何在伺服器上解決此問題?

就在發布問題後,我找到了解決方案。執行以下命令修復了該問題:

yum clean all

試試這個:

與其讓 yum 下載並安裝該 rpm,不如自己下載

wget http://mirrors.rit.edu/epel/6/x86_64/lighttpd-1.4.31-1.el6.x86_64.rpm

然後讓yum安裝

yum localinstall lighttpd-1.4.31-1.el6.x86_64.rpm

引用自:https://serverfault.com/questions/418192