知足却不乏追求
分类: linux
2016-03-11 17:01:27
(1)下载libyuv源码并编译
cd freeswitch/libs
git clone
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
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的升级版
可以直接yum install yasm
或者下载源码包安装
yasm下载地址:
yasm解压命令:tar -zxvf ****.tar.gz
yasm编译安装:① ./configure, ② make, ③make install
yasm安装完毕之后回到第二步重新安装libvpx
(3)下载opus并编译
cd ..
git clone
cd opus
./autogen.sh
./configure
make
make install
cp /usr/local/lib/pkgconfig/opus.pc /usr/lib64/pkgconfig
(4)下载libpng并编译
cd ..
git clone
cd libpng
./configure
make
make install
cp /usr/local/lib/pkgconfig/libpng* /usr/lib64/pkgconfig/
下载并安装以上四个依赖文件后,重新执行freeswitch的“./configure”之后,“make && make install”安装freeswitch了
又出现了下面的错误
cxx mod_lua_la-mod_lua.lo
mod_lua.cpp:37:17: error: lua.h: no such file or directory
mod_lua.cpp:38:21: error: lauxlib.h: no such file or directory
mod_lua.cpp:39:20: error: lualib.h: no such file or directory
解决方法:
yum install lua lua-devel
又出现了下面的错误:
make[4]: entering directory `/usr/local/src/freeswitch-1.6.0/src/mod/formats/mod_sndfile'
makefile:796: *** you must install libsndfile-dev to build mod_sndfile. stop
解决方法:
下载包libsndfile-1.0.26.tar.gz 上传到服务器
下载地址
tar zxvf libsndfile-1.0.26.tar.gz
./configure
make
make install
cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib64/pkgconfig
重新执行重新执行freeswitch的“./configure”,再make make install
freeswitch make 成功后执行
make install
然后根据需要安装语音包
make cd-sounds-install
make cd-moh-install
安装简单的配置文件
make samples
以上便完成了安装,但是启动的时候又报错了:
root@localhost bin]# ./freeswitch
./freeswitch: error while loading shared libraries: libyuv.so: cannot open shared object file: no such file or directory
解决办法: cp /usr/lib/libyuv.so /usr/lib64/
然后就可以正常启动的