Fedora10下源码编译vlc-1.1.1 流程及注意事项(1)

samtao兄文章的指导下完成vlc的源码编译安装,小生感激涕零,自知忘性>记性,且老板要求留存编译流程以备后者,故备忘如下,如能令他人少走弯路节省时间,善莫大焉:


1:下载vlcsource code版本。

(samtao兄用的是1.0.6,等小生下载的时候已经是1.1.1版本,但编译安装过程无区别)

2:为了让root用户可以执行VLC,我们需要加上 --enable-run-as-root(本人以root登录,没加也没问题)

ps:可以执行如下:[root@tsong vlc-1.0.6]# ./configure --help|grep root  查看该命令怎么写

samtao兄写的比较快,如果你是跟我差不多的linux菜鸟,你需要知道./configure编译命令之前还tar -jxvf ****.tar.bz(bz2)压,CD命令进入解压缩后的文件夹等

编译命令:./configure --enable-run-as-root --prefix=/root/soft/vlc

--prefix=/root/soft/vlc 这个是安装目录,可以自己定义更改)

提示缺少libmadconfigure: error: Could not find libmad on your system: you may get it from http://www.underbit.com/products/mad/. Alternatively you can use --disable-mad to disable the mad plugin.

(小生# ./configure 后,在这个mad错误之前还出现这个错误

configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.
但我运行# yum install lua后提示:
Package lua-5.1.4-2.fc10.i386 already installed and latest version

后来才知道应当安装lua-devel,安装后解决了这个问题,后面的fribidi-devel小生也是这时候安装的)

3:编译libmad.

按照提示,下载:http://www.underbit.com/products/mad,编译

./configure --prifix=/root/soft/libmad

make 提示错误(这个make错误小生没遇到,应该是gcc没及时更新,懒人有懒福)

cc1: error: unrecognized command line option "-fforce-mem"
make[2]: *** [version.lo] Error 1
make[2]: Leaving directory `/home/izhier/download/libmad-0.15.1b'

google之,说是gcc版本太高,修改makefile,删除-fforce-mem

即可make,然后make install

(此时libmad安装在/root/soft/libmad文件夹内)

4:继续编译vlc,这时候用如下命令:

./configure --enable-run-as-root --prefix=/root/soft/vlc --with-mad=/root/soft/libmad/

继续,提示找不到libavcodec,

configure: error: Could not find libavcodec or libavutil. Use --disable-avcodec to ignore this error.

 (转下篇)

你可能感兴趣的:(职场,注意事项,休闲,fedora10,vlc-1.1.1)