My work environment requires Apache 2.2.22 instead of the latest version of 2.4. My machine is currently running Ubuntu 13.10. When I use Synaptic or apt-get it will not allow me to choose an older version of Apache than 2.4.

So my question is, how can I force an install of Apache 2.2.22 on Ubuntu 13.10 using Synaptic or apt-get. When I do try to specify the version I get the following:

sudo apt-get install apache2=2.2.22-1ubuntu1
[sudo] password for b18c1: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
apache2 : Depends: apache2-mpm-worker (= 2.2.22-1ubuntu1) but it is not going to installed or
apache2-mpm-prefork (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-event (= 2.2.22-1ubuntu1) but it is not going to be installed or
apache2-mpm-itk (= 2.2.22-1ubuntu1) but it is not going to be installed
Depends: apache2.2-common (= 2.2.22-1ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Apache 2.2 isn't available in the Saucy repositories. You should either work with it or downgrade to Precise Pangolin (Ubuntu 12.04).

If you force it, it makes yourself vulnerable to all sort of quirks and problems that can be in the future.



| improve this answer | |
  • You mean downgrade the OS to Precise? – B18C1 Nov 5 '13 at 21:53
  • Yes. That's the only way that you can get Apache2.2 without problems. – Braiam Nov 5 '13 at 22:04

I've had the same issue. I need ColdFusion 8/9 for some clients which doesn't work with Apache 2.4

You can use the Raring version of Apache 2.2 using the following steps

Create "/etc/apt/sources.list.d/ubuntu1304.list" with:

#Ubuntu 13.04 repro for instead of 2.4
deb http://nl.archive.ubuntu.com/ubuntu/ raring main

Create "/etc/apt/preferences.d/apache22" with:

Package: apache*
Pin: release a=raring
Pin-Priority: 500

And do:

sudo apt-get update
sudo apt-get dist-upgrade
| improve this answer | |
  • this seems to work but the library modules such as libapache2-mod-jk do not seem to work with this solution – Archimedes Trajano Feb 23 '14 at 2:04

If it is worth, to try (and if a Virtual System is not an option)

  • Install new Ubuntu 13.04 on a VirtualBox or VMWare machine.
  • Use synaptics, check Apache2, File> generate download script.
  • Install Ubuntu 13.10 on another VirtualBox or VMWare machine.
  • Run the script in the new U13.10 machine to download Apache2 with all its dependencies.
  • Try installing them using debi (gui) or dpkg (cli).

if it works, install it in your machine.

| improve this answer | |

You have to track those missing packages (those that are displayed as not being able to be installed along with Apache) by installing them one by one manually. After that, you can come back to install Apache.

| improve this answer | |

As root:

# 13.04 = precise, 13.10 = saucy
cat /etc/apt/sources.list | sed 's/precise/saucy/g' > /tmp/1304-sources
echo -e "\n\n\n#\n# Following are precise (13.04) source list\n#\n" >> /etc/apt/sources.list
cat /tmp/1304-sources >> /etc/apt/sources.list
apt-get update
apt-cache policy apache2

Now using synaptic package manger you need to install apache forcing version from 'precise' and after that lock version (see menu package -> lock version and force version). It's not so easy as synaptic seems to have problems, but it's doable. I had to close and open symantec sometimes especially to install some additional libraries.

| improve this answer | |
  • 2
    Following this advice may create a really unsolvable problem - be very careful. – guntbert Nov 18 '13 at 18:17
  • 13.04 is not precise, it is raring, and the terms in the sed s/// substitution expression should be the other way around. – knb Dec 13 '13 at 9:14

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.