FreeSWITCH安裝報錯“You must install libyuv-dev to build mod_fsv”的解決方案


  昨天下午安裝FreeSWITCH時遇到該問題時,整了一個下午都沒解決,也走了許多彎路。如果直接通過yum安裝libyuv-devel時,會報錯說找不到該安裝包。后來又通過FreeSWITCH官網的網上聊天,找FreeSWITCH的工作人員要到了libyuv-devel的安裝方法(請參考:http://pkgs.org/centos-6/epel-x86_64/libyuv-devel-0-0.12.20120727svn312.el6.x86_64.rpm.html)。然而安裝之后還是報同樣的錯誤,感覺通過這個方法安裝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了。起碼我這邊是安裝成功了。

  以上四個依賴文件安裝之后如果還有出現其他錯誤,重新執行“./configure”,”make“時如有報以下錯誤,請參考以下解決:

  (1)系統沒有安裝lua的錯誤

    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

      (2)系統缺少sndfile的庫文件

    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即可。

 

 

  另外,自己搞了個寫論文的工具,可以爬取論文,添加索引及支持論文查重等功能。
  網站地址:https://www.essaytool.com

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM