
나는 팔로우하고 있다https://www.postgresql.org/download/linux/redhat/다음 명령을 사용하여 Centos 7에 postgrsql 9.4를 설치합니다.
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
결과는 다음과 같습니다.
[root@localhost /]# yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
Loaded plugins: fastestmirror
pgdg-centos94-9.4-3.noarch.rpm | 5.4 kB 00:00
Examining /var/tmp/yum-root-6jRPAn/pgdg-centos94-9.4-3.noarch.rpm: pgdg-centos94-9.4-3.noarch
/var/tmp/yum-root-6jRPAn/pgdg-centos94-9.4-3.noarch.rpm: does not update installed package.
Error: Nothing to do
그런 다음 을 실행하면 yum install postgresql94
다음이 제공됩니다.
Loading mirror speeds from cached hostfile
* base: ftp.jaist.ac.jp
* epel: mirror.premi.st
* extras: ftp.jaist.ac.jp
* updates: ftp.jaist.ac.jp
No package postgresql94 available.
Error: Nothing to do
CentOS 7에 postgresql 9.4를 어떻게 설치합니까?
답변1
캐시를 업데이트하셨나요 yum makecache fast
? 깨끗한 시스템에서는 postgres 9.4를 사용할 수 있기 때문입니다.
# yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
# yum makecache fast
...
pgdg94 | 4.1 kB 00:00
...
# yum -y list | sort > yl
# grep -i postgresql yl | grep -v base
...
# yum info postgresql94
...
( yl
쉬운 파악을 위해 파일을 보관합니다.)
답변2
먼저 postgresql과 관련된 패키지가 설치되어 있는지 찾아보세요. 이를 위해서는 아래 명령을 실행하세요:
rpm -qa|grep postgres
위 명령은 설치된 패키지 목록을 제공합니다.
이제 아래 명령을 사용하여 나열된 각 패키지를 하나씩 제거하십시오.
rpm -e <package-name>
OR
yum remove <package-name>
나열된 패키지를 모두 제거한 후 문제에서 언급한 설치 방법과 동일한 방식으로 postgresql-9.4를 설치해 보십시오.
답변3
postgresql 다운로드로 이동대지원하는 postgresql 버전과 배포 및 아키텍처(이 경우 각각 9.4, CentOS 7 및 x86_64)를 선택합니다. 그런 다음 postgresql94를 설치하기 위해 실행해야 하는 명령이 나타납니다.
yum install https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
위 명령문에서 설치를 다음으로 변경 reinstall
하고 실행하십시오.
yum reinstall https://download.postgresql.org/pub/repos/yum/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm
그러면 다음을 성공적으로 실행할 수 있습니다.
yum install postgresql94