zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    C#使用反射得到属性然后创建xml文档
    android多种方式实现异步加载图片
    Linux小结
    ThinkPHP5小结
    redis小结
    Android AIDL使用详解
    广播接收器 broadcast sendOrderedBroadcast android
    Android之ContentProvider总结
    ContentProvider实例整理
    Android网络编程之Socket&Http
  • 原文地址:https://www.cnblogs.com/hezhixiong/p/4797511.html
Copyright © 2011-2022 走看看