Cannot install mono to install Sonarr

Since using RC from Alpha 4 I cannot install mono so as that I can install Sonarr. Lots of broken packages.
Is there a reason for this? In Alpha 4 I could juts install the standard Debian Jessie mono. I get the following after doing:

sudo apt-get install mono-complete

The following packages have unmet dependencies:
mono-complete : Depends: mono-runtime (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-runtime-sgen (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-utils (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-devel (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-mcs (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-csharp-shell (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-2.0-gac (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-4.0-gac (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-2.0-service (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: mono-4.0-service (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: monodoc-base (= 3.2.8+dfsg-10) but it is not going to be installed
             Depends: monodoc-manual (= 3.2.8+dfsg-10) but 3.10.0-0xamarin2 is to be installed
             Depends: libmono-cil-dev (= 3.2.8+dfsg-10) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Any ideas?

Try installing one of the named packages above manually with apt-get install, that should provide further information on why dependencies canā€™t be met.

BTW are you using a Pi 1 or Pi 2 ? Alpha 4 was based on Raspbian for Pi 1 and Pi 2, RC is based on Debian for Pi 2, so there are some differences in available package versions between Pi 1 and Pi 2ā€¦

Itā€™s a Pi 2 running RC. Iā€™ll try to install packages individually and report back

The following packages have unmet dependencies: mono-runtime : Depends: mono-runtime-sgen (= 3.2.8+dfsg-10) but it is not going to be installed

Iā€™ve tried several others and it leads me in a circle. Why will mono not install? Iā€™d love to have Sonarr up and running again as Sickrage isnā€™t as good at error handling, post-processing, and failed downloads

Also have the same issue

It appears the issue is the repository. Try installing from source. Iā€™m trying it now

How did you get on with source?

Hey everybody!

I had a similar problem with installing mono on Vero with OSMC RC2 and I could resolve it by following the guide here:
HTPC Guide - Install Sonarr

There is a hint there to install libmono-cil-dev by lowering the pin preference, however it refers to the old Debian version ā€œwheezyā€ ā†’ OSMC seems to be based on a newer version of Debian called ā€œjessieā€, therefore you have to replace wheezy with jessie.

So, edit the file

sudo nano /etc/apt/preferences

and insert the following

Package: *
Pin: release n=jessie
Pin-Priority: 998

Then update sources and install mono

sudo apt-get update
sudo apt-get install libmono-cil-dev -y

That worked for me. You should remove the above pin preference afterwards however.

May I ask first, what a ā€˜pin preferenceā€™ is?

Phew, I donā€™t have the in-depth knowledge but as far as I understand it controls the priority for apt-get, which version of software should be installed. So you can install a different/newer version, than generally used in jessie (= stable current Debian version).

See also Wikipedia APT

May I ask how you change the pin preference back?

Iā€™ve had similar issues - the dependency errors. Followed the instructions to alter the pin priority, then removed the file afterwards (there was nothing else in it) to set the pin priority back to normal.
This is all fine, and Sonarr works, successfully downloads, and remains after reboot.
Until OSMC does its updates.
Whenever OSMC checks for updates, it says thereā€™s some available and needs to reboot. Once itā€™s finished the updates, Sonarr has disappeared.
By default, Sonarr is installed into /opt/NzbDrone and once OSMC does the updates, NzbDrone is completely removed from that folder and I have to start the install again. My library remains, so I donā€™t need to re-add stuff, but the install directory is gone.

Any thoughts on whatā€™s going on here, and how I can stop it?
For now Iā€™ve put all the install steps into a script, that I manually run after OSMC removes itā€¦

The problem is the sonarr repository contains a version of mono that clashes with the one in jessie, and causes unmet dependencies if you try to upgrade to it. When osmc updates it tries to upgrade mono, finds it canā€™t, so removes the ā€œbrokenā€ packages, and all the packages that used them, which includes sonarr.

The easy fix until it gets done properly is to install sonarr, and once itā€™s working remove the sonarr repository from /etc/apt/sources.list Next time osmc updates it wonā€™t know about the sonarr files and will leave it alone.

2 Likes

Ah!
Iā€™ll try that, thanks!

Edit:
Yep, that seems to have done the trick. Thanks again.

Sorry for reopening this thread but Iā€™m experiencing the dependencies error even when changing the pin priority