установка postgresql повреждена

Я установил postgresql, использующий после команды на 25-х следующих инструкциях на (help.ubuntu.com/community/PostgreSQL)

sudo apt-get install postgres postgresql-contrib

Это хорошо работало. Затем на 27-м я установил пост-ГРЭС-xc после другого учебного руководства, и после этого я получаю ошибку "роль пост-ГРЭС фатальной ошибки, не найденная".

Журнал моей установки:

2015-07-25 18:11:40 install postgresql-contrib-9.3:amd64 <none> 9.3.9-0ubuntu0.14.04
2015-07-25 18:11:42 install postgresql-contrib:all <none>    9.3+154ubuntu1
2015-07-25 18:15:42 install pgadmin3-data:all <none> 1.18.1-2
2015-07-25 18:15:44 install pgadmin3:amd64 <none> 1.18.1-2
2015-07-25 18:15:47 install pgagent:amd64 <none> 3.3.0-1
2015-07-27 20:53:45 install postgres-xc-client:amd64 <none> 1.1-2ubuntu2
2015-07-27 20:54:32 install postgres-xc:amd64 <none> 1.1-2ubuntu2

После этой установки мне предложили работать, автоудаляют установкой. Вот журнал удаленных файлов:

2015-07-27 20:53:25 remove postgresql:all 9.3+154ubuntu1 <none>
2015-07-27 20:53:26 remove postgresql-9.1:amd64 9.1.13-0ubuntu0.13.10 <none>
2015-07-27 20:53:29 remove postgresql-contrib:all 9.3+154ubuntu1 <none>
2015-07-27 20:53:30 remove postgresql-contrib-9.3:amd64 9.3.9-0ubuntu0.14.04 <none>
2015-07-27 20:53:32 remove postgresql-9.3:amd64 9.3.9-0ubuntu0.14.04 <none>
2015-07-27 20:53:35 remove postgresql-client:all 9.3+154ubuntu1 <none>
2015-07-27 20:53:35 remove postgresql-client-9.1:amd64 9.1.13-0ubuntu0.13.10 <none>
2015-07-27 20:53:37 remove postgresql-client-9.3:amd64 9.3.9-0ubuntu0.14.04 <none>
2015-07-27 20:53:37 remove postgresql-common:all 154ubuntu1 <none>
2015-07-27 20:53:39 remove postgresql-client-common:all 154ubuntu1 <none>
2015-07-27 20:55:15 remove libossp-uuid16:amd64 1.6.2-1.3ubuntu1 <none>

Я использую склонный - добираются для установки пост-ГРЭС-xc. Советуйте мне, как сделать мою систему, работающую снова?


испытанное предложение от @saji89 следующим образом:

sudo useradd -r -s /bin/false postgres

результат

ashutosh@ashUbuntu:~$ sudo useradd -r -s /bin/false postgres
[sudo] password for ashutosh: 
useradd: user 'postgres' already exists

Испытанная переустановка postgresql получила следующий отказ:

sudo apt-get install --reinstall postgresql postgresql-contrib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql : Depends: postgresql-9.3 but it is not going to be installed
 postgresql-contrib : Depends: postgresql-contrib-9.3 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

испытанное решение на ссылке https://dba.stackexchange.com/questions/61850/after-installing-postgresql-and-postgres-xc-with-apt-get-i-have-psql-but-not-po

Лучшие две строки являются командами. Первая команда была тиха. Второй дал вывод. Но проблема существует.

ashutosh@ashUbuntu:~$ sudo updatedb
ashutosh@ashUbuntu:~$ sudo locate initdb
/usr/bin/initdb
/usr/share/locale/cs/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/de/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/es/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/fr/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/it/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/ja/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/ko/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/pl/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/pt_BR/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/ro/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/ru/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/sv/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/tr/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/zh_CN/LC_MESSAGES/initdb-9.2.mo
/usr/share/locale/zh_TW/LC_MESSAGES/initdb-9.2.mo
/usr/share/man/man1/initdb.1.gz
ashutosh@ashUbuntu:~$ 
0
задан 13 April 2017 в 15:43

1 ответ

Используйте шаги в как к unistall пост-ГРЭС-x для удаления.

Затем переустанавливают postgresql, который использование

sudo apt-get install --reinstall postgresql postgresql-contrib

Гарантирует для проверки номера порта, поскольку это, возможно, было изменено (Это было изменено в моем случае).

select *
postgres-# from pg_settings
postgres-# where name = 'port';

Другая отнесенная ссылка

1
ответ дан 1 October 2019 в 06:05

Другие вопросы по тегам:

Похожие вопросы: