UNIX/Linux 환경에서 PostgreSQL V8.3.1을 설치중 아래와 같은 메시지가 발생하면서, 설치가 되지 않는 경우가 있었다.

The program "postgres" is needed by initdb but was not found in the
same directory as "/usr/local/pgsql/bin/initdb".
Check your installation

The program "postgres" is needed by pg_ctl but was not found in the
same directory as "/usr/local/pgsql/bin/pg_ctl".
Check your installation

타 시스템과 비교중 /dev/null의 퍼미션이 변경되어 있었다.

initdb 또는 pg_ctl을 root 유저가 아닌 일반유저로 실행시 /dev/null에 쓰기 권한이 없으면, 위와 같은 메시지가 표시되었다.

그래서 /dev/null 의 퍼미션을 아래 명령어와 같이 rw-rw-rw로 변경하여 해당 문제를 해결할 수 있었다.

# chmod 666 /dev/null

퍼미션을 변경하기 전에 /dev/null의 퍼미션을 숙지하여, 발생할 수 있는 오류를 미연에 방지하는 것은 센스~

Posted by dcmru
,