freeswitch 1.6 centos6.5 安装记录

来源:互联网 发布:点击执行js方法 编辑:程序博客网 时间:2024/06/05 11:30
先安装依赖包:
yum install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel e2fsprogs-devel sqlite-devel libcurl-devel pcre-devel speex-devel ldns-devel libedit-devel

#tar zxvf  freeswitch-1.6.0.tar.gz 

#cd freeswitch-1.6.0
#./configure 
#make

make 报错:
make[4]: Entering directory `/usr/local/src/freeswitch-1.6.0/src/mod/applications/mod_fsv'
Makefile:797: *** You must install libyuv-dev to build mod_fsv.  Stop.
    
解决:

(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的升级版
                        可以直接yum install yasm
                        
                    或者下载源码包安装
        yasm下载地址:http://www.tortall.net/projects/yasm/releases/
        yasm解压命令:tar -zxvf ****.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了

    又出现了下面的错误
     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 上传到服务器
      下载地址  http://www.mega-nerd.com/libsndfile/#Download
    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/

然后就可以正常启动的


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(2070) | 评论(0) | 转发(0) |
0

上一篇:scp命令详解!自己比较懒,bu

下一篇:linux下,一个运行中的程序,究竟占用了多少内存?

相关热门文章
  • linux 常见服务端口
  • xmanager 2.0 for linux配置
  • 【ROOTFS搭建】busybox的httpd...
  • openwrt中luci学习笔记
  • 什么是shell
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~
原创粉丝点击