我正在为我的一个课程项目工作,需要下载psycopg2软件包才能使用正在使用的PostgreSQL数据库。然而,当我尝试使用pip install psycopg2下载时,会出现以下错误:
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit status 1
为什么会发生这种情况?
LDFLAGS="-I/opt/homebrew/opt/openssl/include -L/opt/homebrew/opt/openssl/lib" pip install psycopg2-binary
- Bo Lu