【发布时间】:2022-10-25 15:41:12
【问题描述】:
我的/bin/ 目录中有一个pg_config 文件,而我的/bin/ 目录在$PATH 中,但是当我运行$PATH pg_config 时,它说找不到该文件:
有谁知道它来自哪里?
更新:当我刚刚运行'pg_config'时,我有这个:
[root@PF9SODEVSTU048 clickandqualif]# pg_config
BINDIR = /usr/bin
DOCDIR = /usr/share/doc/pgsql
HTMLDIR = /usr/share/doc/pgsql
INCLUDEDIR = /usr/include
PKGINCLUDEDIR = /usr/include/pgsql
INCLUDEDIR-SERVER = /usr/include/pgsql/server
LIBDIR = /usr/lib64
PKGLIBDIR = /usr/lib64/pgsql
LOCALEDIR = /usr/share/locale
MANDIR = /usr/share/man
SHAREDIR = /usr/share/pgsql
SYSCONFDIR = /etc
我应该指定我想在路径中找到“pg_config”的原因。 我的 requirements.txt 中有“psycopg2-binary==2.9.4”,当它尝试安装 psycopg2 并出现以下错误时失败:
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
正因为如此,我想知道我的 'pg_config' 文件是否真的在我的 $PATH 中
【问题讨论】:
标签: linux