-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openssl: relocation error: openssl: symbol EVP_mdc2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference #11227
Comments
Many of the binary packages provided by most Linux distributions contain programs and libraries that are linked against the specific version of openssl that the distribution provides as a package. As such the openssl/libssl/libcrypto packages should be considered as system packages and it is not advisable to replace them with installations from sources if you don't know exactly what you are doing. Ubuntu 18.04 since the last quarter of last year should ship with openssl 1.1.1, so the most advisable solution is to undo your manual installation and reinstall the distribution packages |
If you insist, though, it's possible that the |
hello levitte, this is my result. What exactly do I have to do now to get the links clean? `root@myserver:/# cat /etc/ld.so.conf root@myserver:/# cat /etc/ld.so.conf.d/* Multiarch support/usr/local/lib/aarch64-linux-gnu libc default configuration/usr/local/lib |
I have no clue. So it might be better to update the installation, since 18.04 now has 1.1.1. |
I did compile Open SSL 1.1.1 from source: |
cat /etc/lsb-release
|
Hello Havoc24k, did you have the same mistake? If so, what exactly did you do? |
Hello. I compiled |
Do you just run |
Yes because I installed the openssl lib on the standard lib directory. Maybe your installation differs and you need to run the ldconfig command with extra parameters which specify what folders to check to find the new libraries. See the command parameters that ldconfig supports and run it again with the path parameter pointing to where the openssl library is located. |
I will reiterate the point made by @romen above:
Running ldconfig in the way suggested may cause system packages to start trying to use your custom built OpenSSL which could break stuff. Tread carefully. |
OK, then how about the detailed procedure to remove the self-compiled OpenSSL package here and re-enable that of Ubuntu Server 18.04 LTS? |
I just wanted to comment that you must be aware that many distributions consider openssl, libssl and libcrypto system packages as they are dependencies for their own system tools and many other packages depend on them. Installing your manual compilation of openssl in place of the distributed packages is risky business: distro maintainers might be patching their openssl release in a way that makes things binary incompatible with a vanilla version of openssl, even within releases of the same branch (in this case 1.1.1), so other packages depending on openssl, libcrypto or libssl might start crashing and failing if you go ahead and replace the system version of openssl with your custom installation. To test a new version or to build other applications based on a more recent version of openssl, the recommended way is to install it in a custom path where it won't affect the general system and compile other software against your custom install path. Altering ldconfig or LD_LIBRARY_PATH indiscriminately for the whole system to point to your custom install location will create the same problems, so you should alter them only for the applications that have been compiled against your custom installation (or use runpath/rpath at linking time so that the compiled software embeds hints on the custom library search path). |
If you installed in /usr/local a If you installed somewhere else overwriting the files provided by Ubuntu packages, then this can be risky as You might want to make sure that for any installed openssl package (I guess Ubuntu has one for the binary tool, one for libssl and one for libcrypto, plus the -dev and - dbg, and multiarch counterparts available) you have a local package to force reinstall from. Anyway, the best way to get proper support on how to restore your distro installation after manually overwriting files for the system packages is to ask it on the distro support channels! |
Hello, I solved this by following step. Added /usr/lib to the file /etc/ld.so.conf.d/libc.conf and ran the command ldconfig. It solved the issue. Earlier the error was openssl versionopenssl: relocation error: openssl: symbol EVP_mdc2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference Once the solution applied, the error gone. openssl versionOpenSSL 1.1.1f 31 Mar 2020 |
Task: Trying to build nginx 1.19.1 from source and trying to build and install openssl1.1.1g on top of existing version openssl1.1.1f Error seen on running "openssl version" command as below: openssl: symbol lookup error: openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0 Resolution: add the following entry /usr/lib to /etc/ld.so.conf.d/libc.conf file and run command 'ldconfig' |
Alternatively the following also may work, though I never tried it ... ./config --prefix=/usr/local/lib or try manually copying the libcrypt and libssl library files to whereever openssl is searching for. this of course is the least desirable solution/option. |
After testing with LDFLAGS and various options to ./config this was simplest for running and debugging. Forcing the use of the libraries in the build folder rather than the system ones which cause the error.
Likely there are more "conventional" options for setting up Configure, this just seems the least impact for testing and debugging. Checking library dependencies:
An interesting solution to libraries locations in general was presented in this article
This seems cleaner than copying/moving system library files around or running make/install when debugging/testing before final build. |
sudo ldconfig solved my problem. |
this method is useful...... thank you! |
For what it's worth, my understanding is that |
openssl: symbol lookup error: openssl: undefined symbol: EVP_mdc2, version OPENSSL_1_1_0, I tried ldconfig, move libraries, edit /etc/ld.so.conf.d/libc.conf, did't worked for me, I have ubuntu 20.04 lts in docker. Maybe you can add new version in backports? |
Run error code 404,500 |
Another vote for sudo ldconfig sorting it out. |
@kaduk spoke thusly:
And for OpenSSL installations in /usr/local, it's simple to add a local file (say,
(not necessary on Debian systems, at least those I have access to, as this comes with the package |
thx, it help me install: add lib path: then: it is okay for me. my PC: Ubuntu20.04 |
@Lebhoryi what version have you been compiling? I am trying to compile latest version: OpenSSL_1_1_1m I tried with Always I get:
|
We're using Laravel Homeastead, so I created |
@elcheco the key is adding lib path, pls try again, |
Ubuntu 20.04 |
I added lib64 in openssl.conf and ran ldconfig. Adding lib causes the error described here. |
I'm having the same error. my use-case is having all versions of OpenSSL installed on one system (it's a test system as I also have multiple versions of Curl - each using a separate version of OpenSSL). I also ran into this error (for each installed OpenSSL version). The error comes from the fact that (if not specified) the OpenSSL binary will look for a shared library (that's why editing I solved it by during compiling saying I do not want to use the shared OpenSSL Security library (the one that comes from the dist, íf I used RPATH to help me with this. RPATH is (I think) the default on BSD systems but not Ubuntu, you have to specify it manually. I found this option somewhere in the OpenSSL wiki. The following line solved my use-case for having independent versions of OpenSSL; (version 1.1.1b is simply an example)
|
Hello,
I am using an Ubuntu Server 18.04.4 LTS as an Apache reverse proxy. It had the OpenSSL version 1.1.1 installed and I wanted to update to the current 1.1.1d as well.
For this I followed the following instructions:
https://askubuntu.com/questions/1102803/how-to-upgrade-openssl-1-1-0-to-1-1-1-in-ubuntu-18-04
I have done the download etc. in the home directory of the user root
I just adjusted everything from 1.1.1a to 1.1.1d.
Everything went OK. At the end I made the one restart of the servers.
If I type "openssl version" now, I get the following error message:
openssl: relocation error: openssl: symbol EVP_mdc2 version OPENSSL_1_1_0 not defined in file libcrypto.so.1.1 with link time reference
What do I have to do to get the version and functionality displayed again?
Here still the output of
perl configdata.pm --dump
I'm not a linux pro now and with Openssl I'm also more rudimentary on the road. Please just send me the commands which I have to type in, so that this is OK again.
Thanks a lot
The text was updated successfully, but these errors were encountered: