编程语言
首页 > 编程语言> > macOS安装python psycopg2 Error: pg_config executable not found. ld: library not found for -lssl

macOS安装python psycopg2 Error: pg_config executable not found. ld: library not found for -lssl

作者:互联网

Error

Error: pg_config executable not found. 

ld: library not found for -lssl

安装

# 下载
wget -O psycopg2-2.8.6.tar.gz https://files.pythonhosted.org/packages/fd/ae/98cb7a0cbb1d748ee547b058b14604bd0e9bf285a8e0cc5d148f8a8a952e/psycopg2-2.8.6.tar.gz
tar -zxf psycopg2-2.8.6.tar.gz
cd psycopg2-2.8.6

# 增加pg_config配置
vim setup.cfg
# 修改build_ext的pg_config
# pg_config = /opt/homebrew/opt/postgresql@12/bin/pg_config

# install
LDFLAGS="-I/opt/homebrew/Cellar/openssl@1.1/1.1.1k/include -L/opt/homebrew/Cellar/openssl@1.1/1.1.1k/lib" /usr/local/bin/python setup.py install

 

标签:opt,macOS,1.1,tar,python,psycopg2,pg,found,config
来源: https://www.cnblogs.com/Primzahl/p/15036478.html