Quick Tip : configure: *** The PJPROJECT installation appears to be missing or broken. Asterisk error.
As we already know Asterisk support PJSIP stack also. If you want to use PJSIP stack instead of Asterisk default chan_sip channel. You need to install the PJSIP library’s as shared library’s and then use them while configuring the Asterisk.
First of Install the PJSIP by downloading it from the official PJSIP website or from the asterisk compatible GitHub repository.
1 2 3 4 5 6 |
cd /usr/src git clone https://github.com/asterisk/pjproject pjproject cd pjproject/ ./configure --prefix=/usr --enable-shared --disable-sound --disable-resample --disable-video --disable-opencore-amr --with-external-srtp make sudo make install |
After building and installing pjproject, Asterisk fails to detect any of the libraries – the various res_pjsip components cannot be selected in Asterisk’s menuselect or you will get some error messages like below.
1 2 3 4 5 6 |
configure:23029: checking for PJPROJECT configure:23036: $PKG_CONFIG --exists --print-errors "libpjproject" Package libpjproject was not found in the pkg-config search path. Perhaps you should add the directory containing `libpjproject.pc' to the PKG_CONFIG_PATH environment variable No package 'libpjproject' found |
or
1 2 3 4 5 6 |
"checking for mandatory modules: PJPROJECT SRTP OPENSSL... fail **configure: *** configure: *** The PJPROJECT installation appears to be missing or broken. configure: *** Either correct the installation, or run configure configure: *** including --without-pjproject. " |
This is typically the problem of pkg-config
To get ride of this problem simply install the pkg-config using following command in Debian or Ubuntu based systems.
1 |
sudo apt-get install pkg-config |
Then try to configure Asterisk again, If you still face the same problem. There may be problem with shared library’s This can be solved by running following command.
1 |
ldconfig |
Then verify the PJSIP shared library’s are available or not by running below command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
root@AstRTC:/usr/src/asterisk-13# ldconfig root@AstRTC:/usr/src/asterisk-13# ldconfig -p | grep pj libpjsua2.so.2 (libc6,x86-64) => /usr/lib/libpjsua2.so.2 libpjsua2.so (libc6,x86-64) => /usr/lib/libpjsua2.so libpjsua.so.2 (libc6,x86-64) => /usr/lib/libpjsua.so.2 libpjsua.so (libc6,x86-64) => /usr/lib/libpjsua.so libpjsip.so.2 (libc6,x86-64) => /usr/lib/libpjsip.so.2 libpjsip.so (libc6,x86-64) => /usr/lib/libpjsip.so libpjsip-ua.so.2 (libc6,x86-64) => /usr/lib/libpjsip-ua.so.2 libpjsip-ua.so (libc6,x86-64) => /usr/lib/libpjsip-ua.so libpjsip-simple.so.2 (libc6,x86-64) => /usr/lib/libpjsip-simple.so.2 libpjsip-simple.so (libc6,x86-64) => /usr/lib/libpjsip-simple.so libpjnath.so.2 (libc6,x86-64) => /usr/lib/libpjnath.so.2 libpjnath.so (libc6,x86-64) => /usr/lib/libpjnath.so libpjmedia.so.2 (libc6,x86-64) => /usr/lib/libpjmedia.so.2 libpjmedia.so (libc6,x86-64) => /usr/lib/libpjmedia.so libpjmedia-videodev.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so.2 libpjmedia-videodev.so (libc6,x86-64) => /usr/lib/libpjmedia-videodev.so libpjmedia-codec.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-codec.so.2 libpjmedia-codec.so (libc6,x86-64) => /usr/lib/libpjmedia-codec.so libpjmedia-audiodev.so.2 (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so.2 libpjmedia-audiodev.so (libc6,x86-64) => /usr/lib/libpjmedia-audiodev.so libpjlib-util.so.2 (libc6,x86-64) => /usr/lib/libpjlib-util.so.2 libpjlib-util.so (libc6,x86-64) => /usr/lib/libpjlib-util.so libpj.so.2 (libc6,x86-64) => /usr/lib/libpj.so.2 libpj.so (libc6,x86-64) => /usr/lib/libpj.so |
Then try again running the Asterisk configure command. Most probably you will see beautiful Asterisk ASCII art.
If you want to Install the Asterisk from the Source Please follow the below article.