After I sudo apt-get install mono-devel , when I try to purge mono-devel on Ubuntu Linux 16.04, I get the following error message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mono-devel : Depends: mono-runtime (>= 2.10.1) but it is not installable
Depends: libmono-cecil-private-cil (>= 2.6.3) but it is not going to be installed
Depends: libmono-codecontracts4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-compilerservices-symbolwriter4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-corlib2.0-cil (>= 2.6.3) but it is not going to be installed
Depends: libmono-corlib4.0-cil (>= 2.10.1) but it is not going to be installed
Depends: libmono-peapi2.0-cil (>= 2.4.2) but it is not going to be installed
Why does this error occur and how can I fix it?
Also, is it necessary to install mono-devel for a production system? I understand that mono-devel contains various development tools and pulls in the default development stack for Mono .
We may be using mono-devel for C#/ASP.NET webforms compilation and development.
[EDIT June 13 2016 7:46AM] This morning I ran sudo apt-get -f install followed by sudo apt-get remove mono-devel. Here is the resulting error message: vanhuys@udel-ThinkStation-S10:~$ sudo apt-get remove mono-devel
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies: libapache2-mod-mono : Depends: mono-apache-server (>= 4.2) but it is not going to be installed or mono-apache-server4 (>= 4.2) but it is not going to be installed Depends: mono-apache-server (< 4.4) but it is not going to be installed or mono-apache-server4 (< 4.4) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
1 Answer 1
If you were getting this error on an install operation then a likely cause would be that your local database of available packages doesn't match what's available on the server, so APT is requesting package versions that don't exist anymore. The fix in that case is to run apt-get update
to update the local availability database. However I don't see how this could happen on a remove or purge operation.
It's possible that the APT database was in a transitional state with unresolved dependencies. APT can't cope with unresolved dependencies so the first thing it needs to do, even on a removal operation, is to fix those dependencies. Try running apt-get -f install
to get into a consistent state without changing what APT considers to be the desired state, before you make changes to the desired state such as requesting the installation or removal of a package.
-
Thank you for your great answer. Do I try apt-get -f install or apt-get -f install mono-devel? I may not be able to do this until Monday morning 7:00 AM EDT June 13 2016. How could I reach you at that time?Frank– Frank2016年06月11日 13:32:44 +00:00Commented Jun 11, 2016 at 13:32
-
@Frank Just
apt-get -f install
: the idea is to first repair, then modify.Gilles 'SO- stop being evil'– Gilles 'SO- stop being evil'2016年06月11日 14:45:29 +00:00Commented Jun 11, 2016 at 14:45 -
Thank you for your comment. I will try it Monday morning 7:30A.M EDT June 13 2016 and tell you the results.Frank– Frank2016年06月11日 18:19:18 +00:00Commented Jun 11, 2016 at 18:19
-
I just posted my results and error message at the end of my original question. I found nothing interesting in /var/log/apt, May I ask how to fix the error message? Thank you.Frank– Frank2016年06月13日 11:50:30 +00:00Commented Jun 13, 2016 at 11:50
sudo apt-get update
before a package install ... and before removing a package. I.e. : Currently Ubuntu 16.04 receives updates every day .... will be more consistent in a few months. -apt-get install mono-devel
(and apt is trying to upgrade it to the latest version). I don't see how you could get this error message if you were removingmono-devel
. If this is really the output fromapt-get purge mono-devel
, what doesapt-get -f install
do?/var/log/apt
might provide a clue.