openssl: `OPENSSL_1_1_1' not found (required by openssl)

Error:

> openssl version
> openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
> openssl: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)

I ran the follwoing on Ubuntu 16.04, nginx version: nginx/1.13.9

# git clone git://git.openssl.org/openssl.git
# cd openssl/
# ./config --prefix=/usr/
# make
# sudo make install
# openssl version

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 17 (7 by maintainers)

Most upvoted comments

It should be:

$ export LD_LIBRARY_PATH=/usr/local/lib"

(assuming you installed OpenSSL to the default location)

I have the same issue. In my case (Ubuntu 18.04), even after successful install of openssl (tried various version), it still does not work. I studied this thread as well as many others online and resolve the issue as follows:

  1. sudo apt-get install locate (to install the locate to find where exactly libssl.so.1.1 is.)
  2. execute locate libssl.so.1.1 and it gives the following:
gary@gary-VirtualBox:~/Desktop/Link to GEIRI_LSE$ locate libssl.so.1.1
/home/dmdb/bin/libssl.so.1.1
/snap/core18/1066/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/snap/core18/1144/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/snap/gnome-3-28-1804/67/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/snap/gnome-3-28-1804/71/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/usr/lib/i386-linux-gnu/libssl.so.1.1
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
  1. figure out in the listed location /usr/lib/x86_64-linux-gnu/libssl.so.1.1 is the right one. (it varies on different platforms)
  2. execute export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu Then when execute openssl version, it should work now.
  3. if it works in step 4), you can add export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu to ~/.bashrc to enable a permanent solution, otherwise you need to execute step 4) every time restarts.

Do you expect us to start reading your blog to help you out? Quite the shameless plug there, dude 😉

I’m obviously a newbie

Tried

$ which openssl /usr/local/bin/openssl

$ echo “export LD_LIBRARY_PATH=/usr/local/bin/openssl” >> ~/.bashrc $ export LD_LIBRARY_PATH=/usr/local/bin/openssl"

echo $LD_LIBRARY_PATH /usr/local/bin/openssl

openssl version openssl: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: version OPENSSL_1_1_1' not found (required by openssl) openssl: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version OPENSSL_1_1_1’ not found (required by openssl)

This exception occurred to me when I compile OpenSSL 1.1.1b in my Docker image. As is followed is my solution:

FROM        base AS openssl
LABEL       image=openssl:1.1.1b

ARG         URL_ZLIB_TARBALL=http://www.zlib.net/zlib-1.2.11.tar.gz
ARG         URL_OPENSSL_TARBALL=https://www.openssl.org/source/openssl-1.1.1b.tar.gz
ENV         ZLIB_PREFIX=/usr/local
ENV         OPENSSL_PREFIX=/usr/local
ARG         OPENSSL_DIR=$OPENSSL_PREFIX/ssl
ARG         LD_LIBRARY_PATH=$OPENSSL_PREFIX/lib

# zlib
RUN         cd "$PATH_APP" && \
            curl -sL "$URL_ZLIB_TARBALL" -o zlib.tar.gz && \
            tar -xf zlib.tar.gz --one-top-level=zlib --strip-components 1
RUN         cd "$PATH_APP/zlib" && \
            ./configure --prefix="$ZLIB_PREFIX" && \
            make && \
            make install
RUN         cd "$PATH_APP/zlib" && \
            make clean && \
            rm -f "$PATH_APP/zlib.tar.gz"
# openssl
RUN         cd "$PATH_APP" && \
            curl -sL "$URL_OPENSSL_TARBALL" -o openssl.tar.gz && \
            tar -xf openssl.tar.gz --one-top-level=openssl --strip-components 1
RUN         cd "$PATH_APP/openssl" && \
            ./config \
                --prefix="$OPENSSL_PREFIX" \
                --openssldir="$OPENSSL_DIR" \
                --api=1.1.0 \
                --strict-warnings \
                zlib-dynamic && \
            make && \
            make test && \
            make install && \
            echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> /etc/environment
RUN         cd "$PATH_APP/openssl" && \
            make clean && \
            rm -f "$PATH_APP/openssl.tar.gz"
# openssl test
RUN         openssl version

Corresponding TravisCI build log can be find here:

https://api.travis-ci.org/v3/job/536617134/log.txt

Sorry, just happy to help others with the same error and solution. I’ll delete

Try setting your LD_LIBRARY_PATH to point to the location of your newly compiled OpenSSL libs. The above indicates that you are picking up the old system OpenSSL libraries.