settingsLogin | Registersettings
리눅스 관련 모든 질문답변을 올려주세요! 100% 무료입니다! -Ask Ubuntu KR
Show Menu

우분투 15.04에서 PostgreSQL v9.4 설치하기

1 좋아함 0 싫어요
안녕하세요 우분투 데스크탑 15.04에 PostgreSQL v9.4를 설치하여 사용중이었습니다. 그런데, 무슨 이유인지는 모르겠지만 sudo -u postgres psql 로 접속시 클라이언트프로그램을 설치해야한다면서 계속 문제가 발생하더군요. 그래서 새로 설치하고 삭제하려고 시도하였으나, 다음과 같은 오류가 발생하며 삭제도, 설치도 정상적으로 실행되지 않습니다. 설치 및 제거는 우분투 소프트웨어 센터에서 했습니다.
 

installArchives() failed: Selecting previously unselected package postgresql.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 234760 files and directories currently installed.)
Preparing to unpack .../postgresql_9.4+166bzr2_all.deb ...
Unpacking postgresql (9.4+166bzr2) ...
Setting up postgresql-client-9.4 (9.4.4-0ubuntu0.15.04) ...
update-alternatives: error: alternative path /usr/share/postgresql/9.4/man/man1/psql.1.gz doesn't exist
dpkg: error processing package postgresql-client-9.4 (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of postgresql-9.4:
 postgresql-9.4 depends on postgresql-client-9.4; however:
  Package postgresql-client-9.4 is not configured yet.

dpkg: error processing package postgresql-9.4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql-contrib-9.4:
 postgresql-contrib-9.4 depends on postgresql-9.4 (= 9.4.4-0ubuntu0.15.04); however:
  Package postgresql-9.4 is not configured yet.

dpkg: error processing package postgresql-contrib-9.4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.4; however:
  Package postgresql-9.4 is not configured yet.

dpkg: error processing package postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
Errors were encountered while processing:
 postgresql-client-9.4
 postgresql-9.4
 postgresql-contrib-9.4
 postgresql
Error in function:
dpkg: dependency problems prevent configuration of postgresql-9.4:
 postgresql-9.4 depends on postgresql-client-9.4; however:
  Package postgresql-client-9.4 is not configured yet.

dpkg: error processing package postgresql-9.4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.4; however:
  Package postgresql-9.4 is not configured yet.

dpkg: error processing package postgresql (--configure):
 dependency problems - leaving unconfigured

 

그 이후에 Ubuntu ASK에서 자료를 찾아보다가 문득 service postgresql start 를 실행하니 postgresql이 정상적으로 실행됩니다. 그 뒤에는 다시 sudo -u postgres psql을 입력하니 Error: You must install at least one postgresql-client-<version> package. 라고 뜨네요.  dpkg -l |grep postgresql로 검색하면 client가 깔려있는데요. 설정값을 어떻게 변경해줘야 하는 걸까요?
어플리케이션

1 답변

0 좋아요 0 싫어요
 
우수 답변
자답입니다.

PostgreSQL 의존성이 깨진경우 의존성이 깨졌다고 나오는 패키지를 다 지우고 새로 설치하면 된다고 하네요. 실제 서비스 중에는 이러면 엄청 큰 문제가 생길 것 같은데.. 아무튼 해결은 했습니다.

sudo apt-get remove --purge postgresql-client-9.4 postgresql postgresql-9.4

sudo apt-get install postgresql
Hosting by Microsoft MeltingPot/maru intermet
...