概述
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 installmake 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.gztar 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 屏蔽
最后
以上就是娇气万宝路为你收集整理的FreeSwitch ubuntu18.04编译所需要的库编译的基本步骤congfigure遇到的问题make时遇到的问题的全部内容,希望文章能够帮你解决FreeSwitch ubuntu18.04编译所需要的库编译的基本步骤congfigure遇到的问题make时遇到的问题所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复