Skip to content
This repository has been archived by the owner on Nov 27, 2017. It is now read-only.

curl: symbol lookup error #912

Closed
albertz opened this issue Mar 11, 2016 · 7 comments
Closed

curl: symbol lookup error #912

albertz opened this issue Mar 11, 2016 · 7 comments
Assignees

Comments

@albertz
Copy link
Contributor

albertz commented Mar 11, 2016

zeyer@sulfid ~/c/torch> brew install -s ruby
==> Installing dependencies for ruby: openssl
==> Installing ruby dependency: openssl
==> Downloading https://www.openssl.org/source/openssl-1.0.2g.tar.gz
/work/asr2/zeyer/linuxbrew/opt/curl/bin/curl: symbol lookup error: /work/asr2/zeyer/linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Trying a mirror...
==> Downloading https://dl.bintray.com/homebrew/mirror/openssl-1.0.2g.tar.gz
/work/asr2/zeyer/linuxbrew/opt/curl/bin/curl: symbol lookup error: /work/asr2/zeyer/linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Trying a mirror...
==> Downloading https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2g.tar.gz
/work/asr2/zeyer/linuxbrew/opt/curl/bin/curl: symbol lookup error: /work/asr2/zeyer/linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Error: Failed to download resource "openssl"
Download failed: https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2g.tar.gz

I already did brew unlink curl because of this (somehow my Curl got broken it seems) but this does not make a difference.

@albertz
Copy link
Contributor Author

albertz commented Mar 11, 2016

This fixed it for me:

rm /work/asr2/zeyer/linuxbrew/opt/curl

Now it again uses my system Curl which works.

Shouldn't brew unlink curl have also removed that link?

@DoomHammer
Copy link
Contributor

Best way is to brew fetch openssl && brew install openssl then proceed to working as always. Same for brew upgrade.

@sjackman
Copy link
Member

Try

brew remove openssl curl
brew fetch openssl curl
brew install curl

If that fails, brew install gcc and repeat above.
Check LD_LIBRARY_PATH for conflicting openssl libraries.

@sjackman sjackman self-assigned this Mar 12, 2016
@albertz
Copy link
Contributor Author

albertz commented Mar 12, 2016

Well, rm /work/asr2/zeyer/linuxbrew/opt/curl fixed it already. After that, it uses my system curl and it worked just fine. After reinstalling Linuxbrew openssl and curl, also Linuxbrew curl worked again.

Maybe Linuxbrew should detect if Curl is broken? It wrongly assumes that the download server is down and tries another mirror.

@DoomHammer
Copy link
Contributor

I like @albertz's suggestion. @sjackman, do you have an idea how this could be implemented?

@sjackman
Copy link
Member

I don't feel that's necessary. Yes, curl can break due to shared library issues, but so can any command line application.

@sjackman
Copy link
Member

Glad that you got it working, Albert.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants