0

I would like to upgrade the apache2 v2.2 to v2.4, then I follow the instructions on this site using the command line:

# apt-get install apache2 apache2.2-common apache2-mpm-prefork apache2-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
**apache2 is already the newest version.**
apache2-utils is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies.
apache2-mpm-prefork : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.10) but it is not going to be installed
apache2.2-common : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.10) but it is not going to be installed
**E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).**

It says already installed, then I run:

# service apache2 status
apache2: unrecognized service

Then I run the command line:

#apt-get -f install
The following extra packages will be installed:
apache2-mpm-worker apache2.2-bin apache2.2-common
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed
apache2-mpm-worker apache2.2-bin apache2.2-common
0 to upgrade, 3 to newly install, 0 to remove and 3 not to upgrade.
1 not fully installed or removed.
Need to get 0 B/1,572 kB of archives.
After this operation, 4,568 kB of additional disk space will be used.
Do you want to continue [Y/n]? 
(Reading database ... 185590 files and directories currently installed.)
Unpacking apache2.2-bin (from .../apache2.2-bin_2.2.22-1ubuntu1.10_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2.2-bin_2.2.22-1ubuntu1.10_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/apache2/modules/mod_dir.so', which is also in package apache2-bin 2.4.16-4+deb.sury.org~precise+4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking apache2.2-common (from .../apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb (--unpack):
trying to overwrite '/usr/share/man/man8/apache2.8.gz', which is also in package apache2-bin 2.4.16-4+deb.sury.org~precise+4
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Unpacking apache2-mpm-worker (from .../apache2-mpm-worker_2.2.22-1ubuntu1.10_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/apache2-mpm-worker_2.2.22-1ubuntu1.10_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/apache2', which is also in package apache2-bin 2.4.16-4+deb.sury.org~precise+4
Processing triggers for man-db ...
Errors were encountered while processing:
/var/cache/apt/archives/apache2.2-bin_2.2.22-1ubuntu1.10_amd64.deb
/var/cache/apt/archives/apache2.2-common_2.2.22-1ubuntu1.10_amd64.deb
/var/cache/apt/archives/apache2-mpm-worker_2.2.22-1ubuntu1.10_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)    

I've got so many errors, anyone has an idea about it

Thanks a lot

1 Answer 1

1

Do the following:

sudo apt-get purge apache2

sudo apt-get autoremove

sudo apt-get install apache2

sudo service apache2 status
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.