pg_config executable not found에러

조회수 4135회

발생하는 문제 및 실행환경

psycopg2를 설치하고 싶은데 자꾸 에러가 떠요 커맨드 창에서 pip install psycopg2을 하면

에러 내용

Error: pg_config executable not found.

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'.

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2

근데 이미 PATH안엔 pg_config가 있고, 실행도 잘 되는걸 확인했어요

$ which pg_config
/usr/pgsql-9.1/bin/pg_config

pg_config의 path를 setup.cfg 파일에 넣고 pg_config 웹사이트(http://initd.org/psycopg/)에서 다운 받은 소스파일로 빌드를 해도

Error: Unable to find 'pg_config' file in '/usr/pgsql-9.1/bin/'

자꾸 있는데 왜 찾을 수 없다고 하는 건가요 ㅜㅜ

전부 RHEL 5.5환경에서 sudo로 했는데도 이러면 어떻게 하나요

1 답변

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)