NaijaProgrammer
NaijaProgrammer

Reputation: 2957

How to set the path in Linux

Help when I do 'ffmpeg', I get

ffmpeg: error while loading shared libraries: libavdevice.so.52: cannot open shared object file: No such file or directory.

However, when I do LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg, I get

FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Oct 11 2012 18:52:29 with gcc 4.4.6 20120305 (Red Hat 4.4.6-4)
  configuration: --enable-libmp3lame --enable-libvorbis --enable-shared --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-nonfree --enable-libtheora --enable-version3
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Can someone tell me how to set this permanently. I am a newbie to the linux command window. I saw something about editing the /etc/ld.so.conf file, but I don't know how to do that exactly. Any help will be appreciated

Upvotes: 0

Views: 3763

Answers (2)

jabaldonedo
jabaldonedo

Reputation: 26552

Edit one of these files:

  1. /etc/profile
  2. ~/.bash_profile
  3. ~/.bash_login
  4. ~/.profile

And add: LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg

Then reboot

Upvotes: 2

Brian Agnew
Brian Agnew

Reputation: 272207

You can set

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

in your .profile or .bashrc file (depending on the shell you're using). That way it'll get set for each shell process you open.

This modification will be particular to you. Editing the /etc/ld.so.conf file is a system-wide modification.

Upvotes: 1

Related Questions