I have a CentOS 6.3 x86_64 server and I am trying to install lighttpd. I have installed the EPEL repo on the server using the following:

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

I then attempted to install lighttpd using the following command:

yum install lighttpd lighttpd-fastcgi

The command outputs the following:

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
 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

It then tries to download the packages:

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.

It is trying to download lighttpd-1.4.31-1.el5.x86_64.rpm (the el5 rpm) when the actual real file is http://mirrors.rit.edu/epel/6/x86_64/lighttpd-1.4.31-1.el6.x86_64.rpm the el6 rpm. How do I fix this issue on the server?


Just after posting the question I found the solution. Running the following command fixed the issue:

yum clean all
  • next time run yum update before a yum install – Mike Aug 16 '12 at 13:10
  • I did run yum update before and that didn't help. It seems yum clean all did fix the issue though. Still not sure why though. – Luke Aug 18 '12 at 6:46
  • 2
    Probably because you had EPEL 5 repo on the box at some point in the past. Welcome to Server Fault. Remember to accept your answer. :) – Michael Hampton Aug 18 '12 at 6:56
  • Thanks! Yes I have a feeling that I installed the EPEL 5 repo accidentally before this. – Luke Aug 18 '12 at 6:58

Try this:

Instead of letting yum download and install that rpm, download it yourself

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

and then let yum install it

yum localinstall lighttpd-1.4.31-1.el6.x86_64.rpm
  • Yes but wouldn't it be best to get the repo working so that I receive updates? I did fix the issue myself just after posting the question, see my answer. Looks like something was broken and yum clean all fixed it. Thanks! – Luke Aug 18 '12 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.