Alpine Linux MediaInfo: Unable to load library

Support for Ubuntu and other Desktop Linux distributions
Post Reply
rix
Posts: 8
Joined: 19 Jun 2015, 11:04

Alpine Linux MediaInfo: Unable to load library

Post by rix »

I have built a docker container around my sorting/bash script that is based on alpine linux. There currently is no filebot package available for this distro, but I have set it up successfully.

Only thing not working is MediaInfo:

Code: Select all

FileBot 4.7 (r3923)
JNA Native: 4.0.1
[b]MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 native library libmediainfo.so: Unable to load library 'zen': Native library (linux-x86-64/libzen.so) not found in resource path ([file:/filebot/FileBot.jar])[/b]
Apache Commons VFS: [zip, rar, tar]
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Script Bundle: 2016-10-08 (r408)
Groovy: 2.4.6
JRE: OpenJDK Runtime Environment 1.8.0_92-internal (headless)
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 14 MB Used Memory
OS: Linux (amd64)
Package: PORTABLE
Data: /filebot/data/root
uname: Linux c6223ee13ac4 4.4.23-unRAID #1 SMP PREEMPT Sat Oct 1 13:41:00 PDT 2016 x86_64 GNU/Linux
MediaInfo is installed, however:

Code: Select all

mediainfo --help
MediaInfo Command line,
MediaInfoLib - v0.7.85
Usage: "MediaInfo [-Options...] FileName1 [Filename2...]"
My system is x64 (java, container and host):

Code: Select all

uname -a
Linux c6223ee13ac4 4.4.23-unRAID #1 SMP PREEMPT Sat Oct 1 13:41:00 PDT 2016 x86_64 GNU/Linux
These files reside at

Code: Select all

 /usr/local/lib$ ls
libmediainfo.la  libmediainfo.so.0      libzen.a   pkgconfig
libmediainfo.so  libmediainfo.so.0.0.0  libzen.la
What am I doing wrong? Filebot itself works, not the mediainfo part, however.

Here is my Dockerfile: https://github.com/rix1337/docker-verar ... Dockerfile
Am I somehow building x86 mediainfo or doing some other newcomer-mistake?

Am I building mediainfo the wrong way, or is FileBot portable unable to use mediainfo?
Any help would be greatly appreciated. Even if it means building FileBot myself.. (if so, how?)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Alpine Linux MediaInfo: Unable to load library

Post by rednoah »

You need libmediainfo (the library) not mediainfo (the executable).

Have you tried the 64-bit Linux binaries yet?
https://github.com/filebot/filebot/tree ... inux-amd64
:idea: Please read the FAQ and How to Request Help.
rix
Posts: 8
Joined: 19 Jun 2015, 11:04

Re: Alpine Linux MediaInfo: Unable to load library

Post by rix »

That makes sense, thank you for the fast reply.

I have downloaded and moved those binaries to various locations, but could not figure out the right one..

Could you give me a hint where to store the binaries?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Alpine Linux MediaInfo: Unable to load library

Post by rednoah »

The portable folder should be fine. You can use strace to see where it's looking for libraries.

@see strace viewtopic.php?f=13&t=4192
:idea: Please read the FAQ and How to Request Help.
rix
Posts: 8
Joined: 19 Jun 2015, 11:04

Re: Alpine Linux MediaInfo: Unable to load library

Post by rix »

rednoah wrote:The portable folder should be fine. You can use strace to see where it's looking for libraries.

@see strace viewtopic.php?f=13&t=4192
Wow! Didn't know one could do that..

Code: Select all

[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/filebot/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/bin/../lib/amd64/jli/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/bin/../lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/local/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/libzen.so", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory)
[pid   499] stat("/usr/lib/libzen.so", 0x2b5844109030) = -1 ENOENT (No such file or directory)
[pid   499] open("/lib/libzen.so", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_PATH) = -1 ENOENT (No such file or directory)
[pid   499] stat("/lib/libzen.so", 0x2b5844109030) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/server/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/../lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/filebot/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/bin/../lib/amd64/jli/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/jvm/java-1.8-openjdk/jre/bin/../lib/amd64/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/local/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] open("/usr/lib/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
[pid   499] write(1, "MediaInfo: net.filebot.mediainfo"..., 242MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'zen': Native library (linux-x86-64/libzen.so) not found in resource path ([file:/filebot/FileBot.jar])
These are the lines that either contain zen or media from an strace run. I'll try placing the compiled files in those locations and report back. From past attempts I know, that neither /usr/local/lib nor /usr/lib work if I place libzen.so there..

Thank you for now
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Alpine Linux MediaInfo: Unable to load library

Post by rednoah »

rednoah wrote:The portable folder should be fine. You can use strace to see where it's looking for libraries.
So /filebot is where you extracted the FileBot portable folder? You should copy the libraries there:

Code: Select all

[pid   499] open("/filebot/libzen.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
strace says that /filebot/libzen.so doesn't exist so I guess you copied the *.so files to the wrong location.
:idea: Please read the FAQ and How to Request Help.
cxhamilton
Posts: 6
Joined: 13 Jun 2014, 21:00

Re: Alpine Linux MediaInfo: Unable to load library

Post by cxhamilton »

@rix Did you ever get this working? I have tried the native portable libs without success. I have also installed the libmediainfo package from Alpine's edge branch to no avail. strace shows FileBot finding the shared lib, but still reports the "could not load" error message.
rix
Posts: 8
Joined: 19 Jun 2015, 11:04

Re: Alpine Linux MediaInfo: Unable to load library

Post by rix »

Nope.. switched to the phusion image.
Post Reply