Skip to content
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

getting fatal error: 'openssl/bio.h' file not found on m1 mac #148

Closed
nurjamil opened this issue Oct 6, 2021 · 2 comments
Closed

getting fatal error: 'openssl/bio.h' file not found on m1 mac #148

nurjamil opened this issue Oct 6, 2021 · 2 comments

Comments

@nurjamil
Copy link

nurjamil commented Oct 6, 2021

In file included from ../../pkg/mod/github.com/spacemonkeygo/openssl@v0.0.0-20181017203307-c2dcc5cca94a/bio.go:17:
./shim.h:21:10: fatal error: 'openssl/bio.h' file not found
#include <openssl/bio.h>
^~~~~~~~~~~~~~~
1 error generated.

Ive already install pkgconfig
export LDFLAGS="-L/opt/homebrew/opt/openssl/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl/include"
export PATH="/opt/homebrew/opt/openssl/bin:$PATH"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl/lib/pkgconfig"

pkg-config --variable=includedir openssl

@nurjamil
Copy link
Author

nurjamil commented Oct 7, 2021

solved:

export CGO_LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CGO_CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

@johansetia
Copy link

solved:

export CGO_LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib" export CGO_CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"

sorry. i got this errors and how to fix it

ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libssl.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

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

No branches or pull requests

2 participants