debian 8环境安装freeswitch 1.6.9教程

来源:互联网 发布:什么写作软件好 编辑:程序博客网 时间:2024/05/21 08:36
具体步骤:

1.先安装相关工具及依赖包

apt-get install autoconf automake devscripts g++ gawk gettext git-core libcurl4-openssl-devapt-get install libdb-dev libedit-dev libgdbm-dev 'libjpeg-dev|libjpeg62-turbo-dev' libldns-devapt-get install libncurses5-dev libopus-dev libopus-ocaml libpcre3-dev libperl-dev libpq-dev libsndfile-devapt-get install libspeex-dev libspeexdsp-dev libsqlite3-dev libssl-dev libtiff5-dev 'libtool-bin|libtool'apt-get install make python-dev pkg-config yasmecho "deb http://files.freeswitch.org/repo/deb/debian/ jessie main" > /etc/apt/sources.list.d/99FreeSWITCH.test.listwget -O - http://files.freeswitch.org/repo/deb/debian/key.gpg |apt-key add -apt-get updateDEBIAN_FRONTEND=none APT_LISTCHANGES_FRONTEND=none apt-get install -y --force-yes freeswitch-video-deps-most

注:若无对应安装包可在本文后部文章中设置中科大的软件源,然后执行apt-get update更新软件源后在安装即可

2.选择安装路径

cd /usr/src

3.下载freeswitch源码

git clone https://freeswitch.org/stash/scm/fs/freeswitch.git -bv1.6 freeswitch.git

其中-bv1.6为选择版本,自动选择最新的版本,这里对应最新的版本为1.6.9,最后一个参数freeswitch.git为源码保存的文件夹,如果想看下载下来的源码为什么版本,可打开freeswitch.git目录下的configure.ac,下图红框部分即为版本号

4.切换到源码路径

cd /usr/src/freeswitch.git

5.构建,其中参数-j为开启多线程构建

./bootstrap.sh -j

6.增删模块,将对应模块的前面的#去掉即取消注释,生效该文件

vi modules.conf

7.配置文件

./configure --enable-core-pgsql-support

8.编译及安装

make && make install

9.安装声音文件

make cd-sounds-install cd-moh-install

如果后续要更新,切换到源码路径,执行make current命令即可

cd /usr/local/freeswitch.gitmake current


步骤7可能会遇到问题:

configure: error: no usable pkg-config or pg_config; please install
libpq devel package or equivalent

解决办法为安装libpq-dev,执行以下命令

apt-get install libpq-dev
执行以上命令时可能还会遇到以下问题

正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
有一些软件包无法被安装。如果您用的是 unstable 发行版,这也许是
因为系统无法达到您要求的状态造成的。该版本中可能会有一些您需要的软件
包尚未被创建或是它们已被从新到(Incoming)目录移出。
下列信息可能会对解决问题有所帮助:

下列软件包有未满足的依赖关系:
 libpq-dev : 依赖: libkrb5-dev 但是它将不会被安装
             依赖: comerr-dev 但是它将不会被安装
E: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间
的依赖关系。

源的问题,更换源即可,打开/etc/apt/source.list,将源换成中科大的

deb http://mirrors.ustc.edu.cn/debian jessie main contrib non-freedeb-src http://mirrors.ustc.edu.cn/debian jessie main contrib non-freedeb http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-freedeb-src http://mirrors.ustc.edu.cn/debian jessie-proposed-updates main contrib non-freedeb http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-freedeb-src http://mirrors.ustc.edu.cn/debian jessie-updates main contrib non-free

步骤8可能会遇到的问题:

mod_lua模块中

未找到lua.h 等等,将include文件改成"lua/lua.h"即可

mod_mod模块中

/usr/bin/ld: cannot find -llua

在目录/usr/lib/x86_64-linux-gnu下、建立一个软连接ln -sv liblua5.2.so.0.0.0 liblua.so即可,注意其中5.2为lua的版本

mod_mp4模块中

mp4_helper.hpp:29:28: fatal error: ../mp4v2/mp4v2.h: No such file or directory
 #include "../mp4v2/mp4v2.h"


安装对应的库文件即可,命令

apt-get install libmp4v2-dev

遇到以下情况

Makefile:886: *** You must install libsndfile-dev to build mod_sndfile.  Stop

1.到 http://www.mega-nerd.com/libsndfile/#Download下载tar包

Linux环境下执行以下命令获取

wget http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.27.tar.gz

2.解压

tar zxvf  libsndfile-1.0.27.tar.gz 

3.配置

./configure   

4.编译及安装
make && make install

5.复制到pkgconfig目录下

cp /usr/local/lib/pkgconfig/sndfile.pc /usr/lib/pkgconfig

【64位系统复制到/usr/lib64/pkgconfig中】

6.这步十分必要,到freeswitch目录重新执行configure

./configure --enable-core-pgsql-support



参考出处:

https://freeswitch.org/confluence/display/FREESWITCH/Debian+8+Jessie

0 0
原创粉丝点击