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

[Mac Apple silicon]warning: directory not found for option '-L/usr/local/opt/openssl/lib' #92

Closed
DukeAnn opened this issue Jul 24, 2023 · 3 comments

Comments

@DukeAnn
Copy link

DukeAnn commented Jul 24, 2023

Hello, this error is reported when Go compiles

ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)

https://pic.imgdb.cn/item/64be9f581ddac507cc64a2d7.jpg

@DukeAnn
Copy link
Author

DukeAnn commented Jul 24, 2023

I have installed openssl@3

  brew reinstall openssl@3
➜  td git:(v1.8.0) ✗ brew reinstall openssl@3
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.1.1_1
Already downloaded: /Users/duke/Library/Caches/Homebrew/downloads/30a4cb7b3cf5e6879dbfb142a6ecbf65a0fc2e36dec4627348665c0bcc348dcb--openssl@3-3.1.1_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:c4366444
Already downloaded: /Users/duke/Library/Caches/Homebrew/downloads/f2872284dd1edf793edce5d2222c3f1257de1db2c2f71e31989e032d2e475809--openssl@3--3.1.1_1.arm64_ventura.bottle.tar.gz
==> Reinstalling openssl@3
==> Pouring openssl@3--3.1.1_1.arm64_ventura.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /opt/homebrew/etc/openssl@3/certs

and run
  /opt/homebrew/opt/openssl@3/bin/c_rehash
==> Summary
🍺  /opt/homebrew/Cellar/openssl@3/3.1.1_1: 6,495 files, 28.4MB
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
➜  td git:(v1.8.0) ✗ cd /usr/local/opt/openssl
cd: no such file or directory: /usr/local/opt/openssl

@DukeAnn
Copy link
Author

DukeAnn commented Jul 24, 2023

My directory file is located at /opt/homebrew/opt/openssl, how should I modify the compilation instructions?

@DukeAnn
Copy link
Author

DukeAnn commented Jul 29, 2023

I manually modified the package address in the file, and temporarily resolved the compilation problem.

@DukeAnn DukeAnn closed this as completed Jul 29, 2023
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

1 participant