Cannot install mono to install Sonarr

#1

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?

#2

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…

#3

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

#4

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

#5

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

#6

Also have the same issue

#7

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

#8

How did you get on with source?

#9

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.

[HowTo] Install Emby-Server (BROKEN)
#10

May I ask first, what a ‘pin preference’ is?

#11

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

#12

May I ask how you change the pin preference back?

#13

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…

#14

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
#15

Ah!
I’ll try that, thanks!

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

#17

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