Asterisk 21.2.0编译安装经常遇到的问题和解决办法之json
写在json之前
在讨论jansson之前,我们先来看另外一个问题:
checking for libedit… no
checking for history_init in -ledit… no
configure: error: *** Please install the ‘libedit’ development package.
需要安装libedit。
难道这个没有在 install_prereq 里面吗?
再次测试一下
./contrib/scripts/install_prereq test
提示我需要安装如下的包:
yum install --skip-broken --assumeyes pkgconfig jansson-devel libuuid-devel speex-devel speexdsp-devel libogg-devel libvorbis-devel portaudio-devel xmlstarlet postgresql-devel unixODBC-devel neon-devel gmime-devel uriparser-devel mysql-devel bluez-libs-devel radcli-devel freetds-devel jack-audio-connection-kit-devel libcap-devel net-snmp-devel iksemel-devel corosynclib-devel newt-devel popt-devel libical-devel spandsp-devel libresample-devel uw-imap-devel binutils-devel libsrtp-devel gsm-devel doxygen graphviz hoard codec2-devel fftw-devel libsndfile-devel unbound-devel subversion
还缺不少呢。揣测一下,可能需要反复安装install_prereq,因为有些包可能没安装好。
Asterisk requires libjansson
checking for jansson >= 2.11… no
checking for json_sprintf in -ljansson… no
configure: *** Asterisk requires libjansson >= 2.11 and no system copy was found.
configure: *** Please install the ‘libjansson’ development package or
configure: *** use ‘./configure --with-jansson-bundled’
意思是json没装好。
两个解决办法:
- 从digip下载源代码编译安装
wget https://digip.org/jansson/releases/jansson-2.13.tar.gz --no-check-certificate
tar -zxvf jansson-2.13.tar.gz
cd jansson-2.13
./configure
make
make install
- 从asterisk github下载源代码
先把jansson下载到/tmp目录下
wget https://raw.githubusercontent.com/asterisk/third-party/master/jansson/2.14/jansson-2.14.tar.bz2
然后带一个参数给configure
./configure --with-jansson-bundled --with-pjproject-bundled
原文地址:https://blog.csdn.net/chinavas/article/details/137617355
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!