1

I am attempting to install Apache2 version 2.2 on a computer I just upgraded from Ubuntu 12.04 LTS to 14.04 LTS because a critical software package that runs perfectly on the version of Apache in 12.04 does not work on version 14.04.

From other questions in this forum, I see there is a way to specify a version number while using apt-get, but this isn't working. Here's what I get:

christopher@TRICIA:~$ sudo apt-get install apache2=2.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '2.2' for 'apache2' was not found
christopher@TRICIA:~$ 

Does anyone know the correct syntax to do this?

Pilot6
  • 92,041

2 Answers2

0

you are getting this error because this version is not available on repository which you are using.

you can check which versions are available in repository
apt-cache showpkg <pachagename>
e.g. apt-cache showpkg apache2

then you can install that version using command
apt-get install <packagename>=<complete version name>
e.g. apt-get install apache2=2.2.14-5ubuntu8.7

Alok
  • 504
0

To install apache2.2 use the following process:

On a later distro (e.g. 16.04), I downloaded the 2.2.31 from the Apache site.

I built it using the following configuration:

./configure --enable-so --enable-ssl --with-included-apr --enable-mods-shared=all --enable-load-all-modules --enable-rewrite --enable-proxy --enable-proxy_connect --enable-proxy_http --enable-proxy_ajp --enable-authn_alias --with-npm=prefork --enable-proxy_balancer --enable-proxy_ftp --enable-cache --enable-suexec --enable-disk_cache  > conf.txt

Then of course tweaking the httpd.conf and ssl.conf files.

After that I just run the ./httpd -k start

And it works !

note that I added the apache2.4 via apt-get but never removed it. This means that after system start, I need to kill the apache2 process. And then I am able to start apache2.2. I had to install apache2.4 to use apachectl but later disbanded that because I use ./httpd