红联Linux门户
Linux帮助

FreeSWITCH报错You must install libyuv-dev to build mod_fsv

发布时间:2016-05-15 11:07:19来源:linux网站作者:hezhixiong

安装FreeSWITCH时遇到该问题时,走了许多弯路。如果直接通过yum安装libyuv-devel时,会报错说找不到该安装包。后来又通过FreeSWITCH官网的网上聊天,找FreeSWITCH的工作人员要到了libyuv-devel的安装方法,然而安装之后还是报同样的错误,感觉通过这个方法安装libyuv-devel也没什么用。后来通过以下方法完美的解决了该问题。


个人安装环境:

OS:CentOS6.5  64位
FreeSWITCH Ver:1.6.0


FreeSWITCH安装的官方手册(适用于CentOS6.*):

https://freeswitch.org/confluence/display/FREESWITCH/CentOS+6


安装过程中遇到的问题及解决方法:

1.执行“./configure -C”时,如果出现报错,就是缺少开发包文件(库文件),这种错误比较好解决,缺少什么库文件就安装相应的库文件。


2.执行“make && make install”时,我遇到了一个比较麻烦的错误,所以该文章主要是为了共享这个错误而写。

错误内容:Makefile:797: *** You must install libyuv-dev to build mod_fsv。停止。

解决方案:

(1)下载libyuv源码并编译

cd freeswitch/libs
git clone https://freeswitch.org/stash/scm/sd/libyuv.git
cd libyuv
make -f linux.mk CXXFLAGS="-fPIC -O2 -fomit-frame-pointer -Iinclude/"
make install
cp /usr/lib/pkgconfig/libyuv.pc /usr/lib64/pkgconfig/

(如果只是安装libyuv,接下来还会有报错,我把我报错而需要安装的文件统一罗列如下)

(2)下载libvpx源码并编译

cd ..
git clone https://freeswitch.org/stash/scm/sd/libvpx.git
cd libvpx
./configure --enable-pic --disable-static --enable-shared
(如果出现Configuration failed。错误原因为:Neither yasm nor nasm have been found,则参考以下“※”解决该错误.)
make
make install
cp /usr/local/lib/pkgconfig/vpx.pc /usr/lib64/pkgconfig/

(※)下载yasm并编译

yasm是一个汇编编译器,是nasm的升级版
yasm下载地址:http://www.tortall.net/projects/yasm/releases/
yasm解压命令:tar -zxvf ****.tar.gz (我下载的是yasm-1.3.0.tar.gz)
yasm编译安装:① ./configure, ② make, ③make install
yasm安装完毕之后回到第二步重新安装libvpx

(3)下载opus并编译

cd ..
git clone https://freeswitch.org/stash/scm/sd/opus.git
cd opus
./autogen.sh
./configure
make
make install
cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig

(4)下载libpng并编译
cd ..
git clone https://freeswitch.org/stash/scm/sd/libpng.git
cd libpng
./configure
make
make install
cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/


下载并安装以上四个依赖文件后,重新执行FreeSWITCH的“./configure”之后,“make && make install”就能正常安装FreeSWITCH了。起码我这边是安装成功了。


本文永久更新地址:http://www.linuxdiyf.com/linux/20666.html