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.

17 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

    1. You can but you’ll need to take into account any changes to your configuration to make it compatible with v11.
      Why do you want to downgrade?

      1. I was using 11.10.2 earlier Asterisk Realtime but ringinuse=no was not working and because of this this one sip member in a queue getting multiple calls so to resolve this issue I upgraded to 13.8 cert3 and found ODBC issue there (odbc engine not found) and could not resolve the issue so thinking to downgrade it back to 11.10.2

Leave a Reply

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