2012-10-15 31 views
0

帮助,我得到如何当我做“ffmpeg的”设置路径在Linux中

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

然而,当我做LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib ffmpeg,我得到

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' 

有人能告诉我如何永久设置这一点。我是linux命令窗口的新手。我看到了关于编辑/etc/ld.so.conf文件的一些信息,但我不知道如何做到这一点。任何帮助将(取决于你使用的shell)理解

+0

'/ usr/local/lib ffmpeg'?你的意思是'/ usr/local/lib/ffmpeg'吗? –

回答

2

编辑这些文件中的一个:

  1. /etc/profile文件
  2. 〜/ .bash_profile中
  3. 〜/ .bash_login文件
  4. 〜/ .profile文件

并添加: LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/ usr/local/lib ffmpeg

然后reboo t

+0

谢谢,我最终使用您的建议解决了这个问题 – NaijaProgrammer

1

您可以设置

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib 

.profile.bashrc文件。这样它会为你打开的每个shell进程设置。

此修改将特别针对您。编辑/etc/ld.so.conf文件是系统范围的修改。

+0

谢谢Brian,但我不知道在哪里寻找.profile或.bashrc文件。仍然sooooo新的Linux。 – NaijaProgrammer

+0

感谢您在网站范围设置和用户特定设置之间的区别 – NaijaProgrammer