How to install ffmpeg in a jail.

Hermit

Dabbler
Joined
Aug 23, 2022
Messages
10
Hi, I'm trying to install ffmpeg inside of a jail on my truenas server. I've installed it via a command pgk install ffmpeg but when I've tried to run it the ffmpeg returned an error Shared object "libavdevice.so.58" not found, required by ffmpeg. After some time spend googling the error message I've learned that I have to include that library manually because the path to it is incorrect but I've not been able to find out how to do that on a TrueNas os. Does anyone have a suggestion as to how to get it up and running?

My TrueNas version is TrueNAS-12.0-U5.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Inside the jail, in your .profile, set the environment variable LD_LIBRARY_PATH to include the path to where libavdevice.so.58 lives.
 

Hermit

Dabbler
Joined
Aug 23, 2022
Messages
10
I have added the line LD_LIBRARY_PATH=/usr/local/lib at the end of the .profile file but it did not solve the problem.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Try
Code:
export LD_LIBRARY_PATH="/usr/local/lib"
and then exiting the jail shell and coming back into the jail shell. Run env to make sure the environment variable is active.
 

Hermit

Dabbler
Joined
Aug 23, 2022
Messages
10
The new environment variable doesn't show up in the env. I've tried to restart the jail too, no effect.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What shell are you running as root in the jail? If it's csh, then add
Code:
setenv LD_LIBRARY_PATH /usr/local/lib
to .cshrc.
 
Top