1、下载1.8.5源码
2、执行./bootstrap.sh
3、configure
./configure
不使用 prefix参数默认安装到/usr/local/freeswitch目录下,如果想安装到其他目录,如下:
可能出现的错误:
<1>、no usable zlib; please install zlib devel package or equivalent
yum install zlib-devel -y
<2>、Library requirements (sqlite3 >= 3.6.20) not met;
yum install sqlite-devel -y
<3>、Library requirements (libcurl >= 7.19) not met;
yum install curl-devel -y
<4>、Library requirements (libpcre >= 7.8) not met;
yum install pcre-devel -y
<5>、Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met;
yum install speex-devel -y
<6>、You need to either install libldns-dev or disable mod_enum in modules.conf
yum install ldns-devel -y
<7>、You need to either install libedit-dev (>= 2.11) or configure with –disable-core-libedit-support
yum install libedit-devel -y
<8>、OpenSSL >= 1.0.1e and associated developement headers required
yum install openssl-devel -y
<9>、Cannot build without libtiff (does your system require a libtiff-devel package
yum install libtiff-devel -y
4、编译
make
可能出现的错误
1、 Neither yasm nor nasm have been found
git clone https://github.com/yasm/yasm.git && cd yasm && ./autogen.sh && make && make instal
2、error: invalid combination of opcode and operands
卸载nasm并安装yasm,然后到 libs/libvpx目录下重新configure一下
3、/usr/bin/ld: final link failed: Nonrepresentable section on output
4、/usr/bin/ld: libs/libvpx/libvpx.a(subpixel_mmx.asm.o): relocation R_X86_64_PC32 against symbol `vp8_bilinear_filters_x86_8' can not be used when making a shared object; recompile with -fPIC
进入libs/libvpx目录下,
./configure --enable-pic --enable-static --enable-shared --target=generic-gnu
再次编译: make clean
make
5、You must install libopus-dev to build mod_opus. Stop.
已经安装opus-devel-1.0.2-6.el7.x86_64,但还是报错,于是在modules.conf中注释掉这一行。
6、You must install libks to build mod_signalwire. Stop.
需要安装 libks 和 signalwire-c,比较麻烦,直接在 modules.conf 中注释。