PxPlus User Forum

Twitter Twitter Twitter

Author Topic: How can I fix "Unable to locate SSL library" on Linux  (Read 1334 times)

PxPlus

  • Administrator
  • Diamond Member
  • *****
  • Posts: 1062
    • View Profile
How can I fix "Unable to locate SSL library" on Linux
« on: July 27, 2018, 01:44:06 PM »
On occasion PxPlus is unable to locate the openssl libraries on Linux systems.  This is generally caused by the fact that the openssl libraries have not been properly installed or updated.

When this happens, if you attempt to open a SSL/TLS connection to another computer you will get the following message:

  • Error #13: File access mode invalid
    Last IO to [tcp]......;secure, channel nn
    Unable to locate SSL library (ssleay or libssl) (err/ret=2/2)

This message indicates that the libraries used by SSL (libssl.so and libcrypto.so) are not in the correct location and thus cannot be loaded into PxPlus.

You can determine the location in which the libraries should be found by using the Linux ldd command against the pxplus you installed. 

Below is the output for both the 32 and 64 bits pxplus installs from a Centos system:

  • 32 Bit ldd output

    root@vm-centos-7 pxplus32]# ldd pxplus
    linux-gate.so.1 => (0xf7769000)
    libdl.so.2 => /lib/libdl.so.2 (0xf774a000)
    libm.so.6 => /lib/libm.so.6 (0xf7708000)
    libnsl.so.1 => /lib/libnsl.so.1 (0xf76ee000)
    libc.so.6 => /lib/libc.so.6 (0xf7531000)
    /lib/ld-linux.so.2 (0xf776a000)

  • 64 bit ldd output

    root@vm-centos-7 pxplus64]# ldd pxplus
    linux-vdso.so.1 => (0x00007ffefb18c000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f1ae4c05000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f1ae4903000)
    libnsl.so.1 => /lib64/libnsl.so.1 (0x00007f1ae46e9000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f1ae4327000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1ae4e23000)
Generally on Linux the 32 bit systems the libraries are in /lib whereas on a 64 bit install the libraries can be found in /lib64.  These libraries normally will have links for libssl.so and libcrypto.so which point to the current version of the libraries.  The links should have been setup during the initial openssl install and may be changed during software updates, however sometimes these links get broken or are not setup properly.

On our Linux systems here the .so files point to the current version of libssl (1.0.1e in this case):

  • [root@vm-centos-7 pxplus64]# ls -l /lib/libssl.so
    lrwxrwxrwx. 1 root root 16 May 31 2016 /lib/libssl.so -> libssl.so.1.0.1e

  • [root@vm-centos-7 pxplus64]# ls -l /lib64/libssl.so
    lrwxrwxrwx. 1 root root 16 May 31 2016 /lib64/libssl.so -> libssl.so.1.0.1e

To resolve the problem with PxPlus not being able to find the SSL libraries you need to locate the proper openssl libraries on your system and create the required symbolic links for libssl.so and libcrypto.so using the Linux ln command.  (Make sure you make the link symbolic and not a hard link)

NOTE: There is usually a libcrypt.so (missing 'o') in the library directories.  This is NOT part of the openssl libraries and should not be touched.
« Last Edit: July 27, 2018, 01:49:00 PM by PxPlus »