pip install psycopg2==2.8.6 Error[ld: library not found for -lssl]

~ % brew install openssl
==> Fetching openssl@3
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/manifests/3.0.7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/3/blobs/sha256:5b3d605f5c1fcadfea094c5670091e4bec2b2de7c121874b
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:5b3d605f5c1fcadfea094c5670091e4bec2
######################################################################## 100.0%
==> Pouring openssl@3--3.0.7.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

openssl@3 is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides LibreSSL.

If you need to have openssl@3 first in your PATH, run:
  echo 'export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"' >> ~/.zshrc

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

==> Summary
🍺  /opt/homebrew/Cellar/openssl@3/3.0.7: 6,454 files, 28.0MB
==> Running `brew cleanup openssl@3`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
~ % export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
~ % export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
~ % pip install psycopg2==2.8.6
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting psycopg2==2.8.6
  Using cached psycopg2-2.8.6.tar.gz (383 kB)
Using legacy 'setup.py install' for psycopg2, since package 'wheel' is not installed.
Installing collected packages: psycopg2
    Running setup.py install for psycopg2 ... done
Successfully installed psycopg2-2.8.6

 

 
posted @ 2022-12-21 19:40  JeromePowell  阅读(162)  评论(0编辑  收藏  举报