Upgrading Apache, unmet dependencies

Upgrading Apache on Ubuntu 14.04.5

I use a couple of Ubuntu Linux virtual machines via VMWare Fusion (OSX) for security testing. Some of the security tools have a web interface. Because I want to test with different environment setups I have /var/www/ mounted via Shared Folders on the host OSX. This has as advantage that

  • Files are stored centrally (on the host OS)
  • Different environments can use the same files and configuration (if stored in /var/www)
  • I can use native OSX tools to manipulate and edit files

The usual apt-get update / upgrade process recently caused an error

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-bin (= 2.4.7-1ubuntu4.13) but 2.4.7-1ubuntu4.17 is installed
           Depends: apache2-data (= 2.4.7-1ubuntu4.13) but 2.4.7-1ubuntu4.17 is installed
E: Unmet dependencies. Try using -f.

Using the -f (fix broken) option did not solve the issue

Errors were encountered while processing:
 /var/cache/apt/archives/apache2_2.4.7-1ubuntu4.17_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I was able to resolve the issue by unmounting the shared folder, doing the fix broken upgrade and then remounting the shared folder. I do not know what is the underlying problem but it solved the problem in my case.

Remember that mounting the shared folders is done via

mount -t vmhgfs .host:/www /var/www/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.