Skip to content

Instantly share code, notes, and snippets.

@aklap
Created October 17, 2016 04:25
Show Gist options
  • Star 41 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save aklap/e885721ef15c8668ed0a1dd64d2ea1a7 to your computer and use it in GitHub Desktop.
Save aklap/e885721ef15c8668ed0a1dd64d2ea1a7 to your computer and use it in GitHub Desktop.
Resolving missing link to libcrypto/openssl on OSX
@bio-informatician
Copy link

If you are using a conda env, simply use

conda install -c bioconda samtools openssl=1.0

@arkakkar
Copy link

arkakkar commented Apr 8, 2021

thanks

@CrowleyRajapakse
Copy link

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

when you perform this export commands in the terminal above issue got resolved for me.

@elahmo
Copy link

elahmo commented May 30, 2021

is there a way to make this work on M1 Macs with BigSur?

@drone1
Copy link

drone1 commented Jun 8, 2021

Yes please :(

is there a way to make this work on M1 Macs with BigSur?

@corismall
Copy link

me too! Although I'm using an Intel core desktop with BigSur. I'm hesitant to downgrade.

@ever-dev
Copy link

ever-dev commented Jul 12, 2021

In M1 chip computers, the installations are placed in /opt/homebrew/opt instead of /usr/local/opt.
So we should use the following:

export LDFLAGS="-L/opt/homebrew/opt/curl/lib -L/opt/homebrew/opt/openssl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/curl/include -I/user/local/opt/openssl/include"

@klaus4
Copy link

klaus4 commented Dec 19, 2021

<CrowleyRajapakse commented on 22 Apr>
For compilers to find openssl@1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
👍

@DWmelon
Copy link

DWmelon commented Aug 10, 2022

thanks, it work for me

@elfgoh
Copy link

elfgoh commented Aug 29, 2022

this command solve my problem on github CI job: cp /usr/local/opt/openssl@1.1/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/

On M1 seems like I can make to with $ ln -s /opt/homebrew/opt/openssl\@1.1/lib/pkgconfig/libcrypto.pc /usr/local/lib/pkgconfig/libcrypto.pc

Copy link

ghost commented Oct 24, 2022

@elfgoh thanks, this worked for me!

@EhsanZ
Copy link

EhsanZ commented Nov 5, 2023

In M1 chip computers, the installations are placed in /opt/homebrew/opt instead of /usr/local/opt. So we should use the following:

export LDFLAGS="-L/opt/homebrew/opt/curl/lib -L/opt/homebrew/opt/openssl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/curl/include -I/user/local/opt/openssl/include"

Thank you very much 🙏

@BrianODell
Copy link

for what it's worth, I got through a compile (v2.48) with:

./configure LDFLAGS=-L/opt/homebrew/lib/ CFLAGS="-I/opt/homebrew/include"

on my M1 mac. Zero symlinks or copying of files!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment