FreeSwitch ubuntu18.04编译

freeswitch 编译
https://www.cnblogs.com/lmxx/p/10519505.html

所需要的库

#带sudo apt-get install 是这次编译所遇到的,如果事先安装好,一次性通过
automake 
autoconf 
sudo apt install libtool
sudo apt install libtool-bin
gcc 
zlib1g-dev 
libjpeg-dev 
sudo apt install libsqlite3-dev
libcurl4-openssl-dev 
libpcre3-dev l
sudo apt-get install ibspeex-dev 
sudo apt-get install libspeexdsp-dev 
sudo apt-get install libldns-dev 
sudo apt-get install libssl-dev (重新下载代码,解决了)
sudo apt-get install libtiff-dev
yasm 
liblua5.3-dev 
libshout-dev 
libmpg123-dev 
libmp3lame-dev 
libsndfile-dev 
libopus-dev 
libedit-dev 
libavformat-dev 
libswscale-dev

编译的基本步骤

./configure --help:查看配置


./bootstrap.sh
#./configure 默认是这个,我们不需要视频和图片相关的功能,只需要语音
./configure --disable-FEATURE --disable-libyuv --disable-libvpx --disable-core-libedit-support --without-png --without-freetype
make
sudo make install
sudo make sounds-install 
sudo make moh-install 
sudo make cd-sounds-install 
sudo make cd-moh-install

#这句是错误的,默认安装在/usr/local/freeswitch路径下
sudo make install --prefix=/home/nano/work_dir/freeswitch/install

congfigure遇到的问题

问题现象: libtool not found

bootstrap: libtool not found. You need libtool version 1.5.14 or newer to build FreeSWITCH from source.

解决命令:  
sudo apt install libtool
sudo apt install libtool-bin

问题现象:
 error: Library requirements (sqlite3 >= 3.6.20) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

解决命令:  sudo apt install libsqlite3-dev

问题现象:

configure: error: Library requirements (speex >= 1.2rc1 speexdsp >= 1.2rc1) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.

解决命令: sudo apt install libspeexdsp-dev

问题现象:

configure: error: You need to either install libldns-dev or disable mod_enum in modules.conf

解决命令:  sudo apt install libldns-dev 

问题现象:

configure: error: You need to either install libedit-dev (>= 2.11) or configure with --disable-core-libedit-support

解决命令:  sudo apt install libedit-dev

问题现象:
configure: error: can't find openssl >1.0.1 crypto lib

解决方法1(失败)

发现libcrypt.so指向的是

:/usr/lib/aarch64-linux-gnu$ ls -l libcrypt.so 
lrwxrwxrwx 1 root root 36 5月  25  2021 libcrypt.so -> /lib/aarch64-linux-gnu/libcrypt.so.1

中间执行了: sudo ln -fs libcrypto.so.1.1 libcrypt.so 

:/usr/lib/aarch64-linux-gnu$ ls -l libcrypt.so
lrwxrwxrwx 1 root root 16 4月  20 09:22 libcrypt.so -> libcrypto.so.1.1
 

解决方法2:(成功)
重新下载openssl进行编译
​​​​​​​官方openssl源码下载:https://www.openssl.org/source/
./config
make
make install

make install后的默认安装位置:
库文件安装的路径: /usr/local/lib/libcrypto.so.1.1
                               /usr/local/lib/libssl.so.1.1
头文件安装的路径: /usr/local/include/openssl

*** Installing manpages
/usr/bin/perl ./util/process_docs.pl \
        "--destdir=/usr/local/share/man" --type=man --suffix=

*** Installing HTML manpages
/usr/bin/perl ./util/process_docs.pl \
        "--destdir=/usr/local/share/doc/openssl/html" --type=html

问题现象:

configure: error: "Cannot build without libtiff (does your system require a libtiff-devel package?)"
configure: error: ./configure.gnu failed for libs/spandsp

问题答案:
sudo apt-get install libtiff-dev

make时遇到的问题

libs/esl/fs_cli.c:1424:6: error: variable ‘use_history_file’ set but not used [-Werror=unused-but-set-variable]
  int use_history_file = 0;

在相关的代码里加入宏进行编译
#ifdef HAVE_LIBEDIT
#endif

问题现象:

making all mod_opus
make[4]: Entering directory '/home/nano/work_dir/freeswitch/freeswitch-v1.8.4/src/mod/codecs/mod_opus'
Makefile:922: *** You must install libopus-dev to build mod_opus.  Stop.

解决方法1:(失败)

sudo apt-get install libopus-dev (失败)

解决方法2:(失败)

下载地址:
https://archive.mozilla.org/pub/opus/
下载的包是opus-1.3.1.tar.gz

tar xf opus-1.3.1.tar.gz
./configure --help
#./configure --prefix=/home/thirdparty/install/opus
./configure  #默认要安装到系统文件夹里
make 
make install

 

问题现象:
making all mod_signalwire
make[4]: Entering directory '/home/nano/work_dir/freeswitch/freeswitch-v1.8.4/src/mod/applications/mod_signalwire'
Makefile:929: *** You must install libks to build mod_signalwire.  Stop.

问题答案:
修改文件freeswitch-v1.8.4/modules.conf
#mod_signalwire 屏蔽

问题现象:
making all mod_sndfile
make[4]: Entering directory '/home/nano/work_dir/freeswitch/freeswitch-v1.8.4/src/mod/formats/mod_sndfile'
Makefile:924: *** You must install libsndfile-dev to build mod_sndfile.  Stop.

问题答案:
修改文件freeswitch-v1.8.4/modules.conf
#mod_sndfile 屏蔽

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值