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没装好。
两个解决办法:

  1. 从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
  1. 从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

we love json

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值