Fix missing Asterisk library error (libasteriskssl.so.1 & libasteriskpj.so.2 not found)
Here we will discuss how to solve a problem with the libasteriskssl and
libasteriskpj libraries that may appear during installation on Debian or
other systems.
1) Symptoms of the problem
After compiling Asterisk using the ./configure
command with the --libdir=/usr/lib64
parameter, we will encounter problems with starting the Asterisk system
at the end of the installation. The system will not be able to find the
necessary libraries. This may result in a message similar to the
following:
error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory
ldd /usr/sbin/asterisk
You can see that the operating system cannot find two libraries; libasteriskssl and libasteriskpj. Errors appear:
libasteriskssl.so.1 => not found
libasteriskpj.so.2 => not found
After compiling Asterisk using the
./configure
command with the --libdir=/usr/lib64
parameter, we will encounter problems with starting the Asterisk system
at the end of the installation. The system will not be able to find the
necessary libraries. This may result in a message similar to the
following:
error while loading shared libraries: libasteriskssl.so.1: cannot open shared object file: No such file or directory
ldd /usr/sbin/asterisk
You can see that the operating system cannot find two libraries; libasteriskssl and libasteriskpj. Errors appear:
libasteriskssl.so.1 => not found
libasteriskpj.so.2 => not found
2) Solution to the problem
As you can see, the system is trying to find the libraries in the /lib/x86_64-linux-gnu
directory. We need to look for where they are actually located.
find / -name 'libasteriskssl.so.1'
As we could guess, the compiler copied them from the source to the place we indicated, i.e. /usr/lib64
We now need to put them in the right place, i.e. in /lib/x86_64-linux-gnu
We will use the ln
command to create appropriate symbolic links to these necessary libraries.
ln -s /usr/lib64/libasteriskssl.so.1 /lib/x86_64-linux-gnu
ln -s /usr/lib64/libasteriskpj.so.2 /lib/x86_64-linux-gnu
Now we can run Asterisk without any problems and check its status.
systemctl start asterisk
systemctl status asterisk
After switching to the asterisk console, we can monitor the operation of the system.
/usr/sbin/asterisk -rvvv
Problem solved!
- Get link
- X
- Other Apps
Comments
Post a Comment