PDA

View Full Version : apache2 won't update- Please help me out!



AWV
2015-12-17, 19:53
This error is on a Nethunter install but didn't get any workable ideas over there so thought I'd try here. Should be same as regular Kali. It must be a permissions issue but I can't figure it out.

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

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

Here's some outputs:

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.

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:~#

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:~#

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:~#

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

My question is, what did you try already? Only the few things written on top?
Next: Did you really change anything in the conffiles? Not only by writing, it might be also deleting, renaming or moving!
Well, anyway I did a quick search and found this --> https://wiki.debian.org/DpkgConffileHandling
Try the script you find there..

regards, reidamaxia

trix222
2015-12-18, 07:37
Hi,

Freshly installed kali nethunter on nexus 7 flo, modified sources.list to add sana repo and ive done that in this order : apt-get update > apt-get dist-upgrade > tried apt-get purge apache2, it wont work same error as above, any toughts ?

Thanks in advance.

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

My question is, what did you try already? Only the few things written on top?
Next: Did you really change anything in the conffiles? Not only by writing, it might be also deleting, renaming or moving!
Well, anyway I did a quick search and found this --> https://wiki.debian.org/DpkgConffileHandling
Try the script you find there..

regards, reidamaxia

I've tried the things mentioned, looked at each error and tried to track back to possible sources. No, never touched any of the files prior to this starting. Will check out the script. Thank you!

AWV
2015-12-18, 16:28
Hi,

Freshly installed kali nethunter on nexus 7 flo, modified sources.list to add sana repo and ive done that in this order : apt-get update > apt-get dist-upgrade > tried apt-get purge apache2, it wont work same error as above, any toughts ?

Thanks in advance.

You too? Interesting. Maybe together we can find an answer.

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

My question is, what did you try already? Only the few things written on top?
Next: Did you really change anything in the conffiles? Not only by writing, it might be also deleting, renaming or moving!
Well, anyway I did a quick search and found this --> https://wiki.debian.org/DpkgConffileHandling
Try the script you find there..

regards, reidamaxia

I think that might be beyond my skill level. Looks like its meant to be used in the package update, not by end-user? i tried renaming the file so I would think the installer wouldn't even see it but that was no help.

AWV
2015-12-26, 14:10
Anyone? Really hung up here.