Godfy
Godfy

Reputation: 15

undefined symbol: SSL_CTX_set_alpn_protos

When I use zypper to install a package, I suffer such a problem 'undefined symbol: SSL_CTX_set_alpn_protos'. The full message as bellow .

zypper: symbol lookup error: /usr/local/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos

I have searched the Internet and got some tips. 1. there are two libcurl in my system, and I tried to uninstall one which I installed by myself . But I met another problem , the message as bellow .

*Error building the cache:
[git|https://github.com/git/git] Valid metadata not found at specified URL
Warning: Disabling repository 'git' because of the above error.
Loading repository data...
Reading installed packages...
'subversion' not found in package names. Trying capabilities.
No provider of 'subversion' found.
Resolving package dependencies...
Nothing to do.*
  1. if the problem happen by two libcurl . how can I do, if I want to keep the libcurl that I install ?

I am grateful if somebody can help, THX !

Upvotes: 1

Views: 6949

Answers (1)

Daniel Stenberg
Daniel Stenberg

Reputation: 58002

The libcurl you built and have installed in /usr/local/lib/libcurl.so.4 was built against an OpenSSL version that has the SSL_CTX_set_alpn_protos function. That means OpenSSL 1.0.2 or 1.1.0.

When you now link with that library, it finds an older OpenSSL (1.0.1 or older perhaps?) at run-time that lacks the SSL_CTX_set_alpn_protos function. And it can't continue.

You need to make sure that ld.so will load the newer OpenSSL. You can fix that by taking one of these actions:

  1. uninstalling the older OpenSSL
  2. editing the /etc/ld.so.conf file to create another search order or you can
  3. setup an LD_LIBRARY_PATH for it. Or even...
  4. build libcurl to use a fixed path to the newer OpenSSL

Upvotes: 3

Related Questions