[How-To] Manually upgrade mono from 5.10 to 5.20 in a FreeNAS Jail

[How-To] Manually upgrade mono from 5.10 to 5.20 in a FreeNAS Jail

Brownz

Dabbler
Joined
Sep 5, 2017
Messages
23
@Mannekino Thanks for this info, didnt realise pkg manager could be linked to different repos like this. My default setup was slightly different, but in the end I just changed the end of the url string from 'quarterly' to 'latest' and updated package manager. I think the top guide is much better.
 

remi25140

Cadet
Joined
Oct 21, 2020
Messages
6
Hello
I upgraded my Radarr installation with mono 5.20.1.34 (tested with other mono version higher than 5.10) and Radarr work perfectly.

But when I restart by UI or after an update, I have to launch the service manually.

With same configuration and mono 5.10, restart worked
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Does the user where Radarr is running under have write access to the /usr/local/share/radarr folder? I just changed the user and group of that folder to the user Radarr is running under with chown -R <radarr_user>:<radarr_group> /usr/local/share/radarr/.

Do you have Radarr enabled in /etc/rc.conf?

Did you lock the Radarr package in pkg before you upgraded mono like instructed on the previous page?

And finally with the new Radarr and Sonarr I believe they switched to another .pid file to keep track of the running process.

So what I did was edit the rc.d script for radarr that you can find in /usr/local/etc/rc.d/

Find the line where the pidfile variable is defined and change it to this:

Code:
pidfile="${radarr_data_dir}/radarr.pid"
 
Last edited:

remi25140

Cadet
Joined
Oct 21, 2020
Messages
6
Yes, my user radarr can write into /usr/local/share/radarr
Radarr is enabled in /etc/rc.conf

And y already changed pid name

When I select restart in UI, PID is killed correctly but not restarted
 

Mannekino

Patron
Joined
Nov 14, 2012
Messages
332
Nothing in the Radarr or Jail logs that might help you? I thought the pidfile was the problem actually. I just tested restarting Radarr from the UI here and it worked for me. I am using mono 6.8 but I doubt that is the problem.
 

raybacchus

Cadet
Joined
Jan 13, 2021
Messages
4
The new pkg worked for me, and it is a very simple process done in 2 minutes. But please do a snapshot of your jail and config before.

FreeNAS 11.3U5
Jail is 11.4-RELEASE-p6
Radarr 3.0.1.4259
mono-5.10.1.57_3

My steps was:

SSH into the FreeNAS.

Get into the jail
iocage console radarr

Stop radarr
service radarr stop

Lock the radarr package (otherwise it will be removed when updating mono, because it is a dependency)
pkg lock radarr

See which mono packages are available
pkg search mono

At the time of writing, it is one of these
Code:
mono-5.10.1.57_3               Open source implementation of .NET Development Framework
mono-addins-1.3_1              Mono framework to create extensible applications
mono-basic-4.7                 VisualBasic.NET support for Mono
mono5.10-5.10.1.57_3           Open source implementation of .NET Development Framework
mono5.20-5.20.1.34             Open source implementation of .NET Development Framework
mono6.8-6.8.0.123              Open source implementation of .NET Development Framework
monodevelop-7.6.11.7_2         IDE for the .NET platform


I decided to go for 5.20 as that is what radarr suggested. So go ahead and install it
pkg install mono5.20-5.20.1.34

It will prompt you to confirm that you want to remove the old mono pkg and install the new one. WARNING, if you did not pkg lock radarr, it wil also remove radarr during this install.

Start radarr again
service radarr start

That's it! Super simple, done in 2 minutes.

This made it very easy for me to update Sonarr and Radarr! Thank you as I spent HOURS on this before I saw this solution which took me a whole 32.3 seconds! :smile:
 

remi25140

Cadet
Joined
Oct 21, 2020
Messages
6
Maybe I should try with a fresh install.

Do you think I use good steps ?

Truenas 12 jail 12.2

Pkg install radarr
mkdir -p /config
pw user add radarr -c radarr -u 351 -d /nonexistent -s /usr/bin/nologin
chown -R radarr:radarr /usr/local/share/radarr /config
chmod u+x /usr/local/etc/rc.d/radarr
sysrc radarr_enable=YES
service radarr start
Update radarr to v3 nightly
service radarr stop
pkg lock radarr
pkg install mono5.20-5.20.1.34 (or other)
service radarr start

Thanks
 

Myriad

Dabbler
Joined
Feb 13, 2018
Messages
14
This worked for me and updated Radarr to v3 to boot:
Code:
# mono --version
# pkg lock radarr or pkg-static lock radarr 'If you get a lib error'
# pkg delete mono-x.x-x.x.x.xxx 'Not essential - the new install will overwrite old momo
# fetch https://github.com/jailmanager/jailmanager.github.io/releases/download/v0.0.1/mono-6.8.0.105.txz
# pkg install -y mono-6.8.0.105.txz
# pkg unlock radarr
Reboot jail
 

anon4324239685

Dabbler
Joined
May 5, 2018
Messages
21
The new pkg worked for me, and it is a very simple process done in 2 minutes. But please do a snapshot of your jail and config before.

FreeNAS 11.3U5
Jail is 11.4-RELEASE-p6
Radarr 3.0.1.4259
mono-5.10.1.57_3

My steps was:

[...]

This is the way and it worked like a charm. Went from mono5.10 to mono5.20 since thats what radarr/sonarr are asking.
 

HitmanThe47

Dabbler
Joined
May 7, 2021
Messages
12
This worked for me and updated Radarr to v3 to boot:
Code:
# mono --version
# pkg lock radarr or pkg-static lock radarr 'If you get a lib error'
# pkg delete mono-x.x-x.x.x.xxx 'Not essential - the new install will overwrite old momo
# fetch https://github.com/jailmanager/jailmanager.github.io/releases/download/v0.0.1/mono-6.8.0.105.txz
# pkg install -y mono-6.8.0.105.txz
# pkg unlock radarr
Reboot jail

This worked for me...

I try "pkg install mono6.8-6.8.0.123" and I got the message:

ld-elf.so.1: /usr/local/bin/mono: Undefined symbol "pthread_getname_np@FBSD_1.6"

Maybe It's a problem with PKG or the version since the manual instalation is for the mono-6.8.0.105
 

bek

Cadet
Joined
Sep 1, 2021
Messages
2
This worked for me...

I try "pkg install mono6.8-6.8.0.123" and I got the message:

ld-elf.so.1: /usr/local/bin/mono: Undefined symbol "pthread_getname_np@FBSD_1.6"

Maybe It's a problem with PKG or the version since the manual instalation is for the mono-6.8.0.105

I had to bump my jail to 12.2 for this to work. That got that error out of the way.
 

bek

Cadet
Joined
Sep 1, 2021
Messages
2
I was looking for some mono fixes and had run across this thread.

I took an alternate approach, rather than locking packages, I went this way:


Code:
pkg update
pkg set -y -n mono:mono5.20
pkg upgrade


...
  - mono-5.10.1.57_3 conflicts with mono5.20-5.20.1.34 on /usr/local/bin/al
  - mono-5.10.1.57_3 conflicts with mono5.20-5.10.1.57_2 on /usr/local/bin/al
Cannot solve problem using SAT solver, trying another plan
...
Installed packages to be UPGRADED:
 mono5.20: 5.10.1.57_2 -> 5.20.1.34


This changes dependency since some were using "mono" outright instead of mono5.20 for example.
 

timpj5

Cadet
Joined
Sep 18, 2015
Messages
9
Trying this guide but i don't even get past the service sonarr stop... says sonarr service isn't running. Checked the /etc/rc.d and sonarr_enable="YES" is there, Sonarr is still running (i can access the website) but can't stop the service to start pkg update
 

paradoxiom

Patron
Joined
Jun 16, 2015
Messages
239
Is it possible to use mono 6.12?
how would I upgrade to that?
 

cdiddy

Dabbler
Joined
Oct 3, 2017
Messages
39
I was looking for some mono fixes and had run across this thread.

I took an alternate approach, rather than locking packages, I went this way:


Code:
pkg update
pkg set -y -n mono:mono5.20
pkg upgrade


...
  - mono-5.10.1.57_3 conflicts with mono5.20-5.20.1.34 on /usr/local/bin/al
  - mono-5.10.1.57_3 conflicts with mono5.20-5.10.1.57_2 on /usr/local/bin/al
Cannot solve problem using SAT solver, trying another plan
...
Installed packages to be UPGRADED:
 mono5.20: 5.10.1.57_2 -> 5.20.1.34


This changes dependency since some were using "mono" outright instead of mono5.20 for example.
this worked for meeeee!!! thanks!
 

Animakojo

Cadet
Joined
Dec 17, 2021
Messages
2
Tried doing all the methods given.

pkg install -y llvm80 libepoxy-1.5.2 says lib isnt found.

Ran through the other steps and still no good. I just recently went from freenas to truenas and now everything is broke. I cannot get mono 5.20 to install for anything. This is a fresh jail. on latest release.
 
Top