PDA

View Full Version : apache2 update fails



AWV
2015-12-09, 01:24
Got everything updated except apache2. Seems it has dependency issues. tells me to use apt-get install -f. that tries then returns

"errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.10+deb8u1_armhf.deb
E:Sub-process /usr/bin/dpkg returned an error code (1)"

Tried to purge apache2 but get dependency errors doing that too.

Ideas?

AWV
2015-12-09, 01:57
There's nothing wrong with /var/cache/apt/archives/apache2_2.4.10+deb8u1_armhf.deb I renamed it, it refetched and gave same errors

AWV
2015-12-09, 02:31
error appears to be in trying to overwrite /etc/apache2/sites-available/000-default.conf > I tried renaming this to .old and it still gives same error. I'm really lost :(

AWV
2015-12-09, 23:20
Come on guys, help me out here. I can't get apache2 either on or off. I've tried everything suggested and all I've found on google.....

AWV
2015-12-10, 00:12
Checked owner and permissions for /etc/apache2/sites-available/000-default.conf , exactly same as my regular Kali laptop. Don't see why it can't overwrite this. Even renamed it can't write it. I can change permissions from root explorer but that doesn't help. Changing directory permissions doesn't help either.

AWV
2015-12-12, 21:25
still hoping for ideas on this. Really don't want to wipe this thing because a file can't be overwritten....

longGoneSun
2015-12-12, 22:04
What is the output you get from "ls -lah /etc/apache2/sites-available/" ?

AWV
2015-12-13, 15:16
Thank you for responding! Output is this:


root@kali:~# ls -lah /etc/apache2/sites-available
total 60K
drwxrwxr-x. 2 root root 4.0K Dec 11 02:38 .
drwxr-xr-x. 7 root root 4.0K Dec 11 02:38 ..
-rw-r--r--. 1 root root 1.3K Sep 14 2014 000-default.conf
-rw-r--r--. 1 root root 610 Sep 14 2014 accounts.google.conf
-rw-r--r--. 1 root root 4.8K Sep 14 2014 apple.conf
-rw-r--r--. 1 root root 607 Sep 14 2014 blackberry.conf
-rw-r--r--. 1 root root 692 Dec 22 2014 default
-rw-r--r--. 1 root root 7.1K Dec 22 2014 default-ssl
-rw-r--r--. 1 root root 646 Sep 14 2014 facebook.conf
-rw-r--r--. 1 root root 601 Sep 14 2014 gmail.com.conf
-rw-r--r--. 1 root root 1.5K Sep 14 2014 google.conf
-rw-r--r--. 1 root root 747 Sep 14 2014 secure-redirect.conf
-rw-r--r--. 1 root root 593 Sep 14 2014 windows.conf
root@kali:~#

longGoneSun
2015-12-13, 21:07
Yeah as you said, everything looks alright there. Try doing the "apt-get remove --purge apache2" and provide the full output here.

Assuming that isn't working, what is the specific error you are getting about the 000-default.conf file? Again the specific error copy/pasted you will help a lot to figure out the issue.

AWV
2015-12-13, 22:23
Yeah as you said, everything looks alright there. Try doing the "apt-get remove --purge apache2" and provide the full output here.

Assuming that isn't working, what is the specific error you are getting about the 000-default.conf file? Again the specific error copy/pasted you will help a lot to figure out the issue.


OK, 5 minutes....

AWV
2015-12-13, 22:28
OK, here's that.....


root@kali:~# apt-get remove --purge apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
apache2-mpm-prefork : Depends: apache2 (= 2.4.10-10+deb8u1) but it is not going to be installed
apache2.2-common : Depends: apache2 (>= 2.3~) but it is not going to be installed
libapache2-mod-php5 : Depends: apache2 (>= 2.4) but it is not going to be installed
mana-toolkit : Depends: apache2 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@kali:~#

AWV
2015-12-13, 22:38
Here's the full error on the install:


root@kali:~# apt-get -f install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
apache2.2-bin apache2.2-common libclass-isa-perl libdrm-nouveau1a
libswitch-perl libsystemd-login0 sqlite3
Use 'apt-get autoremove' to remove them.
Suggested packages:
www-browser apache2-doc apache2-suexec-pristine apache2-suexec-custom
The following packages will be upgraded:
apache2
1 upgraded, 0 newly installed, 0 to remove and 800 not upgraded.
3 not fully installed or removed. Need to get 0 B/205 kB of archives.
After this operation, 355 kB of additional disk space will be used. (Reading database ... 136890 files and directories currently installed.)
Preparing to unpack .../apache2_2.4.10-10+deb8u1_armhf.deb ...
Obsolete conffile /etc/apache2/mods-available/authz_default.load has been modified by you.
Saving as /etc/apache2/mods-available/authz_default.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/authn_default.load has been modified by you.
Saving as /etc/apache2/mods-available/authn_default.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/mem_cache.load has been modified by you.
Saving as /etc/apache2/mods-available/mem_cache.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/mem_cache.conf has been modified by you.
Saving as /etc/apache2/mods-available/mem_cache.conf.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/authn_alias.load has been modified by you.
Saving as /etc/apache2/mods-available/authn_alias.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/cern_meta.load has been modified by you.
Saving as /etc/apache2/mods-available/cern_meta.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/disk_cache.load has been modified by you.
Saving as /etc/apache2/mods-available/disk_cache.load.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/disk_cache.conf has been modified by you.
Saving as /etc/apache2/mods-available/disk_cache.conf.dpkg-bak ...
Obsolete conffile /etc/apache2/mods-available/imagemap.load has been modified by you.
Saving as /etc/apache2/mods-available/imagemap.load.dpkg-bak ...
Unpacking apache2 (2.4.10-10+deb8u1) over (2.2.22-13+deb7u6) ...
dpkg: error processing archive /var/cache/apt/archives/apache2_2.4.10-10+deb8u1_armhf.deb (--unpack):
trying to overwrite '/etc/apache2/sites-available/000-default.conf', which is also in package mana-toolkit 0~20140915-0kali2
Reinstalling /etc/apache2/mods-available/authz_default.load that was backupped
Reinstalling /etc/apache2/mods-available/authn_default.load that was backupped
Reinstalling /etc/apache2/mods-available/mem_cache.load that was backupped
Reinstalling /etc/apache2/mods-available/mem_cache.conf that was backupped
Reinstalling /etc/apache2/mods-available/authn_alias.load that was backupped
Reinstalling /etc/apache2/mods-available/cern_meta.load that was backupped
Reinstalling /etc/apache2/mods-available/disk_cache.load that was backupped
Reinstalling /etc/apache2/mods-available/disk_cache.conf that was backupped
Reinstalling /etc/apache2/mods-available/imagemap.load that was backupped
Reinstalling /etc/bash_completion.d/apache2.2-common that was moved away
Reinstalling /etc/apache2/sites-available/default that was moved away
Reinstalling /etc/apache2/sites-available/default-ssl that was moved away
Reinstalling /etc/apache2/conf.d/charset that was moved away
Reinstalling /etc/apache2/conf.d/localized-error-pages that was moved away
Reinstalling /etc/apache2/conf.d/other-vhosts-access-log that was moved away
Reinstalling /etc/apache2/conf.d/security that was moved away
Restoring backup of /usr/share/doc/apache2 ...
Processing triggers for man-db (2.7.0.2-5) ...
Errors were encountered while processing:
/var/cache/apt/archives/apache2_2.4.10-10+deb8u1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@kali:~#

Note- apt-get -f install (without specifying apache2) gives same mess.

AWV
2015-12-13, 22:43
and apt-get autoremove fails too. "unmet dependencies":


root@kali:~# apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
apache2 : Depends: apache2-mpm-worker (= 2.2.22-13+deb7u6) but it is not installed or
apache2-mpm-prefork (= 2.2.22-13+deb7u6) but 2.4.10-10+deb8u1 is installed or
apache2-mpm-event (= 2.2.22-13+deb7u6) but it is not installed or
apache2-mpm-itk (= 2.2.22-13+deb7u6) but it is not installed
Depends: apache2.2-common (= 2.2.22-13+deb7u6) but 2.4.10-10 is installed
apache2-mpm-prefork : Depends: apache2 (= 2.4.10-10+deb8u1) but 2.2.22-13+deb7u6 is installed
apache2.2-common : Depends: apache2 (>= 2.3~) but 2.2.22-13+deb7u6 is installed
libapache2-mod-php5 : Depends: apache2 (>= 2.4) but 2.2.22-13+deb7u6 is installed
E: Unmet dependencies. Try using -f.
root@kali:~#

AWV
2015-12-15, 23:06
Anyone have any ideas at all?

reidamaxia
2015-12-18, 06:35
Hi there

have had a look in a newer thread with the same problem and found yours while searching a solution!
Please follow this thread as it's stupid to have the same theme two times --> https://forums.kali.org/showthread.php?28808-apache2-won-t-update-Please-help-me-out!
There might also be already a solution too!

regards, reidamaxia

AWV
2015-12-18, 16:40
Hi there

have had a look in a newer thread with the same problem and found yours while searching a solution!
Please follow this thread as it's stupid to have the same theme two times --> https://forums.kali.org/showthread.php?28808-apache2-won-t-update-Please-help-me-out!
There might also be already a solution too!

regards, reidamaxia

I know better than to dupe a thread but was getting desperate as I got no real help here so I did. My apologies.