Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu : Unable to correct problems, you have held broken packages

trying to install this, I am getting the 'Unable to correct problems, you have held broken packages' error message.

Apache version

Server version: Apache/2.4.2 (Ubuntu) Server built: Jun 27 2012 07:23:35

# aptitude install libapache2-mod-wsgi

The following NEW packages will be installed:
  apache2.2-common{ab} libapache2-mod-wsgi
 0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 299 kB of archives. After unpacking 1,047 kB will be used.
The following packages have unmet dependencies:
 apache2 : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
 apache2.2-common : Depends: apache2.2-bin (= 2.2.22-1ubuntu1.5) but it is not going to     be installed.
                Depends: apache2-utils but it is not going to be installed.
 apache2-bin : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
 apache2-data : Conflicts: apache2.2-common but 2.2.22-1ubuntu1.5 is to be installed.
The following actions will resolve these dependencies:

 Keep the following packages at their current version:
1)     apache2.2-common [Not Installed]
2)     libapache2-mod-wsgi [Not Installed]


Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

Any help appretiated

like image 683
user1161599 Avatar asked Apr 12 '14 19:04

user1161599


People also ask

What does unable to correct problems you have held broken packages mean?

A Unable to correct problems, you have held broken packages error message often occurs because you are trying to install or have installed a package that you're not supposed to install.

Can't mark Ubuntu Desktop for upgrade E unable to correct problems you have held broken packages?

Make sure that your system's package cache is updated Your system checks this cache for the available packages. It's possible (but not certain) that the dependency package is seen by the system after the cache update. Try installing the troublesome package again and see if it fixes the problem.


1 Answers

Option 1: You can try:

sudo apt-get upgrade

The 'upgrade' option tries to solve all dependencies in installed packages. Often this is enough to solve broken packages

Option 2: If your package was installed from a 'deb' file and not from repositories, it may be that the new one you are trying to install is causing a conflict, and as a result you need first to remove the previous version of the package. You can do that from Software Center or directly with:

sudo apt-get remove libapache2-mod-wsgi
sudo apt-get clean
sudo apt-get autoclean

then

sudo apt-get update
sudo apt-get install libapache2-mod-wsgi

Hope that helps!

like image 177
OM55 Avatar answered Sep 29 '22 10:09

OM55