0

I was trying to install the latest version of mono... but now somehow my package manager is broken with the error: Error: Broken Count > 0.

When I try to install any package using the software manager GUI I get an error:

"Unable to install 'Synaptic Package Manager': Error while installing package: trying to overwrite '/usr/lib/mono/msbuild/15.0 which is also in package msbuild-sdkresolver 1"

When I try and do sudo apt --fix-broken install I get the error:

Trying to overwrite '/usr/lib/mono/msbuild/15.0', which is also in package msbuild-sdkresolver 1:15.4+xamarinxplat.2017.09.14.16.14-0xamarin2+ubuntu1404b1
Errors were encountered while processing:
 /var/cache/apt/archives/msbuild_1%3a16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1804b1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

And this results in a general package system broken error when trying to run the software updater graphically: package system broken oh no

How do I fix my mono install and package manager?

Leftover Salad
  • 199
  • 2
  • 11
  • Have you tried removing mono completely first. It seems like you have two packages that have the same dependency – stratus Dec 03 '19 at 23:02
  • I tried removing mono (I confirmed it was gone by typing `mono -V` and the command is not found). The problem still persists when I call `sudo apt --fix-broken install` – Leftover Salad Dec 03 '19 at 23:21
  • I think another problem is that I still have a bunch of libmono-*.deb and mono-*.deb files kicking around in /var/cache/apt/archives? – Leftover Salad Dec 03 '19 at 23:26
  • Still after `apt purge mono-*; apt autoremove; apt install -f`? Already tried `dpkg-reconfigure -a`? – Pablo Bianchi Dec 03 '19 at 23:47
  • The problem is when I run `apt autoremove` I get an error: `The following packages have unmet dependencies: mono-complete : Depends: ca-certificates-mono (= 6.4.0.198-0xamarin3+ubuntu1804b1) but 5.4.1.7-0xamarin5+debian7b1 is installed mono-devel : Depends: ca-certificates-mono (= 6.4.0.198-0xamarin3+ubuntu1804b1) but 5.4.1.7-0xamarin5+debian7b1 is installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ` – Leftover Salad Dec 03 '19 at 23:49
  • I also get this error when I try following methods of removing mono through `apt-get`, I had to remove it by typing `whereis mono` and `rm -rf`ing the directories listed – Leftover Salad Dec 03 '19 at 23:51
  • oh and sorry for the spam here, when I run `dpkg --configure -a` I also get the error: `Processing was halted because there were too many errors.` – Leftover Salad Dec 03 '19 at 23:53
  • It's not enough to simply uninstall the conflicting deb packages. You must disable-or-delete the non-Ubuntu source that provided those packages *and uninstall every package provided by that source*. After removing the source and it's packages, run `sudo apt update` to refresh the available package database. Mono is in the Ubuntu repositories, so you likely didn't really need to add that non-Ubuntu source anyway. – user535733 Dec 04 '19 at 00:32

0 Answers0