Error: MediaInfo Library could not be loaded libmediainfo.so.0

Sonarr version (exact version): 3.0.6.1342
Mono version (if Sonarr is not running on Windows): 5.20.1
OS: RHEL8 ubi8 container
Debug logs:

[v3.0.6.1342] System.DllNotFoundException: libmediainfo.so.0 assembly: type: member:(null) `` NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo.MediaInfo_New() at NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo..ctor () [0x00006] in <2bc41dd24a3e4961be251c9a3820214d>:0 at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x00021] in <2bc41dd24a3e4961be251c9a3820214d>:0 2022-01-04 15:24:06.8|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available 2022-01-04 15:24:06.9|Error|VideoFileInfoReader|mediainfo is required but was not found [v3.0.6.1342] System.DllNotFoundException: libmediainfo.so.0 assembly: type: member:(null) at (wrapper managed-to-native) NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo.MediaInfo_New() at NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo..ctor () [0x00006] in <2bc41dd24a3e4961be251c9a3820214d>:0 at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x00021] in <2bc41dd24a3e4961be251c9a3820214d>:0 2022-01-04 15:24:06.9|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available 2022-01-04 15:24:06.9|Error|VideoFileInfoReader|mediainfo is required but was not found [v3.0.6.1342] System.DllNotFoundException: libmediainfo.so.0 assembly: type: member:(null) at (wrapper managed-to-native) NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo.MediaInfo_New() at NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo..ctor () [0x00006] in <2bc41dd24a3e4961be251c9a3820214d>:0 at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x00021] in <2bc41dd24a3e4961be251c9a3820214d>:0 2022-01-04 15:24:06.9|Error|VideoFileInfoReader|mediainfo is required but was not found [v3.0.6.1342] System.DllNotFoundException: libmediainfo.so.0 assembly: type: member:(null) at (wrapper managed-to-native) NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo.MediaInfo_New() at NzbDrone.Core.MediaFiles.MediaInfo.MediaInfo..ctor () [0x00006] in <2bc41dd24a3e4961be251c9a3820214d>:0 at NzbDrone.Core.MediaFiles.MediaInfo.VideoFileInfoReader.GetMediaInfo (System.String filename) [0x00021] in <2bc41dd24a3e4961be251c9a3820214d>:0 2022-01-04 15:24:06.9|Error|DetectSample|Failed to get runtime from the file, make sure mediainfo is available 2022-01-04 15:25:36.7|Error|VideoFileInfoReader|mediainfo is required but was not found

Description of issue:
I am building my own container, but the issue is that when I use CentOS7 i get the an error message, the solution to that is to downgrade the mono version to 5.20.1. I can not downgrade the version in CentOS7.

So I moved to RHEL8 ubi container image and I can downgrade the version of mono, and Sonarr starts, but now it starts with a new error message, states that a dll is missing from the package.

(1) Had an initial error when running Sonarr v3 in container. Error was:

MediaInfo Library could not be loaded libmediainfo.0.dylib assembly: type: member:(null)

(2) I found the following solution from this bug report #3442. It suggests to downgrade mono version to 5.20.1. I did that, but now I get a new error:

MediaInfo Library could not be loaded libmediainfo.so.0

I can not find the DLL anywhere in the container, especially some of the solutions that suggest renaming the libmediainfo dll from 17 to 0

Are you sure you’re getting MediaInfo Library could not be loaded libmediainfo.0.dylib assembly: type: member:(null) on RHEL? Absolutely 100% sure?
Coz that’s a mac osx error, not linux. .dylib are mac’s version of .so libraries.

On that note, did you check the mediaarea site and actually install libmediainfo?

No dylib my bad, I copied the text from the solution.
It was the Linux equivalent. When I searched the solution, that’s where it took me.

See below…

MediaInfo Library could not be loaded libmediainfo.so.0

image

did you check the mediaarea site and actually install libmediainfo?

I have not, I actually had a hard time finding the prerequisite packages required for the installation and my installation is based on the v2 install pre-reqs.

Having a look and it looks like there is no package for RHEL8, RHEL7 is the latest.

I’ll try building in RHEL7 hoping won’t have the same issue I had with CentOS7.

Yeah I can not target a specific version of mono for rhel7 or centos7.
That breaks things for me even further, I have to use version 5.x, in version 6 on rhel/centos7 I get more errors.

I ended up using the mono:5.20 docker image which is based on debian 9, and then pulling and installing all the necessary packages for sonarr v3.

No issues, and no errors with this one.