asterisk: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory

Issue

You install Asterisk 12 successfully but receive the following error when trying to launch asterisk:

asterisk: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory

Solution

Execute this

echo “/usr/local/lib” > /etc/ld.so.conf.d/usr_local.conf

and

/sbin/ldconfig

Cause

I’m not expert on this. Can anyone explain why this works? I’ll give you a link to your website in return.

13 thoughts on “asterisk: error while loading shared libraries: libjansson.so.4: cannot open shared object file: No such file or directory”

  1. Hi 🙂

    ldconfig creates the necessary links to the runtime libraries, you need to create a config file and add the path of the library of your choice.

    therefore, the quickest way to do this is to redirect console to the file named /etc/ld.so.conf.d/usr_local.conf

    if you dump the file you will find the following line:

    /usr/local/lib

    then you run ldconfig which reads your config file and make any necessary changes to the shared/runtime library cache and links.

  2. Yipee also worked for me. But had to enter the /sbin directory and run the two commands before it eventually worked.

    Asterisk running perfectly

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.