Mono: dependency errors with apt install

Created on 18 Jan 2019  路  2Comments  路  Source: mono/mono

I am not able to install the latest version of mono-devel and could really use some pointers on how to resolve this. I have not encountered this issue before but have run mono for a while.

On one server, I have mono 4.2.3 and get the same error from apt.

On another server, it is clean, never had mono on it and I also get the exact same error from apt.

Steps to Reproduce

  1. Added Ubuntu 18.04 repo
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list sudo apt update
  2. apt install mono-devel

`Sudo apt install 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:
mono-devel : Depends: libc6 (>= 2.27) but 2.23-0ubuntu10 is to be installed or
libc6.1 (>= 2.27) but it is not installable or
libc0.1 (>= 2.27) but it is not installable
Depends: libglib2.0-0 (>= 2.56.3) but 2.48.2-0ubuntu4.1 is to be installed
Depends: libmono-microsoft-build-utilities-v4.0-4.0-cil (>= 3.6.0) but it is not going to be installed
Depends: libmono-system-design4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-drawing-design4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-messaging4.0-cil (>= 2.10.1) but it is not going to be installed
Depends: libmono-system-runtime4.0-cil (>= 2.10.1) but it is not going to be installed
Depends: libmono-system-servicemodel-activation4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-servicemodel-web4.0-cil (>= 3.2.1) but it is not going to be installed
Depends: libmono-system-servicemodel4.0a-cil (>= 3.2.3) but it is not going to be installed
Depends: libmono-system-web-extensions4.0-cil (>= 2.10.3) but it is not going to be installed
Depends: libmono-system-web-services4.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-web-webpages-razor2.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-web-webpages2.0-cil (>= 1.0) but it is not going to be installed
Depends: libmono-system-web4.0-cil (>= 2.10.3) but it is not going to be installed
Depends: libmono-system-windows-forms4.0-cil (>= 1.0) but it is not going to be installed
Depends: mono-mcs (= 5.18.0.240-0xamarin1+ubuntu1804b1) but it is not going to be installed
Depends: mono-roslyn (= 5.18.0.240-0xamarin1+ubuntu1804b1) but it is not going to be installed
Depends: mono-gac (= 5.18.0.240-0xamarin1+ubuntu1804b1) but 4.2.3.4-0xamarin2 is to be installed
Depends: mono-xbuild (= 5.18.0.240-0xamarin1+ubuntu1804b1) but it is not going to be installed
Depends: libmono-cil-dev (= 5.18.0.240-0xamarin1+ubuntu1804b1) but it is not going to be installed
Depends: libmono-2.0-dev (>= 5.18.0.240-0xamarin1+ubuntu1804b1) but it is not going to be installed
Depends: libmono-2.0-dev (< 5.18.0.240-0xamarin1+ubuntu1804b1.1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.`

On which platforms did you notice this

Linux Mint 18.3

question

Most helpful comment

Nevermind, for anyone else getting the same problem, i fixed it this way

Remove everything to do with mono

sudo apt-get purge libmono* cli-common mono-runtime

Deleted the source in /etc/apt/sources.list.d

then just went through the steps on mono's website again. I am not sure what was wrong but purging it all and starting again seems to have worked with no problems.

All 2 comments

Nevermind, for anyone else getting the same problem, i fixed it this way

Remove everything to do with mono

sudo apt-get purge libmono* cli-common mono-runtime

Deleted the source in /etc/apt/sources.list.d

then just went through the steps on mono's website again. I am not sure what was wrong but purging it all and starting again seems to have worked with no problems.

Debian SID 10 users have to pin mono's repository so to install it correctly:

sudo apt install -t vs-buster mono-complete

PS: If you are facing Op's issue first do remove all Debian's mono packages installed then proceed to install it from mono's repo:

sudo apt-get purge libmono* cli-common mono-runtime
sudo apt autoremove

Was this page helpful?
0 / 5 - 0 ratings