[SOLVED] Error while compiling -and later running- Asterisk 16 over CentOS 7.6

Hello guys,

I’m installing a new Asterisk 16 server over CentOS 7.6

while downloading additional dependencies, I downloaded Jansson v2.12 from:
http://www.digip.org/jansson/releases/jansson-latest.tar.gz
since it is marked as the latest release and compiled it without any issues

Further on, while compiling Asterisk 16.3.0 (downloaded from http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-16.3.0.tar.gz) got an error while preparing the config command:
./configure --libdir=/usr/lib64 --with-pjproject-bundled

At the end, it prints this warning/error:

checking for JANSSON… 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’

is there a way to bypass this and make Asterisk work with the 2.12 version?

EDIT:
Changed post title from Error while compiling Asterisk 16 over CentOS 7.6
to Error while compiling -and later running- Asterisk 16 over CentOS 7.6
because the first was solved by a post however found another issue on the same installation which is now also solved
Cheers

Did you compile and install jansson in a place that Asterisk would be able to detect it from? It seems not. The easiest option, though, is really to just use the bundled version.

Hi there jcolp,

I ran this again, on a clean virtual machine with CentOS 7.6 just in case I messed something up since I was following the FreePBX installation wiki
downloaded Asterisk 16.3.0 in my /usr/src directory
used the bundled version as you suggested so I ran:
./configure --libdir=/usr/lib64 --with-pjproject-bundled
and still got the same error:
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’

The easiest option is to just do as the message says and use the bundled version of jansson.

** ./configure
–libdir=/usr/lib64** –with-jansson-bundled

Thank you for the replies jcolp and annusfictus

So first, since I was following the FreePBX installation guide in their wiki

I ran the configure command as: ./configure --libdir=/usr/lib64 --with-pjproject-bundled

Checked the documentation in Asterisk wiki https://wiki.asterisk.org/wiki/display/AST/PJSIP-pjproject

So yes, the command is correct, however, is easy to missread the error message is actually this:
configure: use ‘./configure --with-jansson-bundled’

So I did that and it could finish configuring Asterisk the I ran make menuselect, only added chan_ooh and app_macro also ran make && make install && make config
there were no issues

ps shows asterisk is running:

ps aux | grep asterisk

root 3755 0.0 0.0 113184 940 pts/3 S 04:39 0:00 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 5994 50.5 3.0 641164 30748 pts/3 Sl 04:44 0:01 /usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c
root 6035 0.0 0.0 112728 976 pts/3 S+ 04:44 0:00 grep --color=auto asterisk
root 18273 0.0 0.0 113184 960 pts/3 S 04:20 0:01 /bin/sh /usr/sbin/safe_asterisk -U asterisk -G asterisk
asterisk 20440 0.0 0.9 582008 9356 ? S 04:24 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 20441 0.0 0.9 582008 9356 ? S 04:24 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 20442 0.0 0.9 582008 9356 ? S 04:24 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 20443 0.0 0.9 582008 9356 ? S 04:24 0:00 /usr/sbin/httpd -DFOREGROUND
asterisk 20444 0.0 0.9 582008 9356 ? S 04:24 0:00 /usr/sbin/httpd -DFOREGROUND

However something created a new issue: I couldn’t go into the asterisk cli

asterisk -rvv

Unable to open specified master config file ‘/etc/asterisk/asterisk.conf’, using built-in defaults

So the asterisk.conf file was missing, I had to manually create it - remember I was trying to install freepbx 14 with asterisk 16- as suggested by this post: https://community.freepbx.org/t/solved-freepbx-14-and-asterisk-13-error-while-install-n/58476/2?u=eonagy19

and now it is up and running :slight_smile:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.