Форум русскоязычного сообщества Ubuntu


Получить помощь и пообщаться с другими пользователями Ubuntu можно
на irc канале #ubuntu-ru в сети Freenode
и в Jabber конференции ubuntu@conference.jabber.ru

Автор Тема: поломался Postgresql  (Прочитано 5726 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн djserg-minyar

  • Автор темы
  • Любитель
  • *
  • Сообщений: 68
    • Просмотр профиля
поломался Postgresql
« : 21 Мая 2012, 17:50:57 »
Всем привет, пытаюсь запустить postgresql сервер, но получаю ошибку после добавления пользователя

@Komp:/var/lib# su postgres
postgres@Komp:/var/lib$ createuser -P -s user
Enter password for new role:
Enter it again:
createuser: could not connect to database postgres: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?

как я понял из того что нашел в интернете, это то что сервер postgresql не стартанул.

удалил все
apt-get remove postgresql-8.4 postgresql-client-8.4 postgresql-contrib

идалил все папки postgresql с сервера, потом

aptitude install -f
aptitude install postgresql-8.4 postgresql-client-8.4 postgresql-contrib


но после эффект тот же,
как можно восстановить постгре сервер??

Оффлайн v!tax

  • Старожил
  • *
  • Сообщений: 4154
  • Gentoo x64 bspwm
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #1 : 22 Мая 2012, 01:16:10 »
1.перевод с английского нужен?
2.удаляйте нормально приложение
господь ведет твою руку, сын мой....

Оффлайн djserg-minyar

  • Автор темы
  • Любитель
  • *
  • Сообщений: 68
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #2 : 31 Июля 2012, 09:15:06 »
теперь не удалить, не установить не могу(((

# apt-get remove postrgesql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package postrgesql
root@Komp:/home/sergej# apt-get remove postgresql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  postgresql
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 61,4kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 144194 files and directories currently installed.)
Removing postgresql ...
Setting up postgresql-8.4 (8.4.11-0ubuntu0.10.10) ...
.: 22: Can't open /usr/share/postgresql-common/maintscripts-functions
dpkg: error processing postgresql-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 postgresql-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)

# apt-get install postgresql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  postgresql
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/28,1kB of archives.
After this operation, 61,4kB of additional disk space will be used.
Selecting previously deselected package postgresql.
(Reading database ... 144190 files and directories currently installed.)
Unpacking postgresql (from .../postgresql_8.4.11-0ubuntu0.10.10_all.deb) ...
Setting up postgresql-8.4 (8.4.11-0ubuntu0.10.10) ...
.: 22: Can't open /usr/share/postgresql-common/maintscripts-functions
dpkg: error processing postgresql-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-8.4; however:
  Package postgresql-8.4 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 postgresql-8.4
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)

Что делать?

Оффлайн easy2002

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 2786
  • Мурманск
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #3 : 31 Июля 2012, 10:13:15 »
.: 22: Can't open /usr/share/postgresql-common/maintscripts-functions
наверное, это последствия
идалил все папки postgresql с сервера, потом

Пользователь решил продолжить мысль 31 Июля 2012, 10:14:24:
apt-get install --reinstall postgresql-commonчто говорит?
Tempora mutantur et nos mutantur in illis

Оффлайн djserg-minyar

  • Автор темы
  • Любитель
  • *
  • Сообщений: 68
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #4 : 31 Июля 2012, 10:15:24 »
ну да почистил, как вот щас восстановить не знаю.
Данную папку что в ошибки создал, щас немного другой вывод:

# apt-get install postgresql
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  postgresql
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0B/28,1kB of archives.
After this operation, 61,4kB of additional disk space will be used.
Selecting previously deselected package postgresql.
(Reading database ...
dpkg: warning: files list file for package `postgresql-common' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-common' missing, assuming package has no files currently installed.
(Reading database ... 143950 files and directories currently installed.)
Unpacking postgresql (from .../postgresql_8.4.11-0ubuntu0.10.10_all.deb) ...
Setting up postgresql-contrib-8.4 (8.4.11-0ubuntu0.10.10) ...
dpkg: error processing postgresql-contrib-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up postgresql (8.4.11-0ubuntu0.10.10) ...
Errors were encountered while processing:
 postgresql-contrib-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)

Оффлайн easy2002

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 2786
  • Мурманск
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #5 : 31 Июля 2012, 10:22:04 »
dpkg: warning: files list file for package `postgresql-common' missing, assuming package has no files currently installed.
sudo apt-get install --reinstall postgresql-common
Tempora mutantur et nos mutantur in illis

Оффлайн djserg-minyar

  • Автор темы
  • Любитель
  • *
  • Сообщений: 68
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #6 : 31 Июля 2012, 10:25:04 »
Обругался на какой то скрипт, но я такой точно не удалял

# sudo apt-get install --reinstall postgresql-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 88,9kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://ru.archive.ubuntu.com/ubuntu/ maverick/main postgresql-common all 111 [88,9kB]
Fetched 88,9kB in 0s (2 577kB/s)     
Preconfiguring packages ...
(Reading database ...
dpkg: warning: files list file for package `postgresql-common' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-common' missing, assuming package has no files currently installed.
(Reading database ... 143954 files and directories currently installed.)
Preparing to replace postgresql-common 111 (using .../postgresql-common_111_all.deb) ...
Unpacking replacement postgresql-common ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up postgresql-common (111) ...
Can't locate PgCommon.pm in @INC (@INC contains: /usr/share/postgresql-common /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /usr/share/postgresql-common/run-upgrade-scripts line 18.
BEGIN failed--compilation aborted at /usr/share/postgresql-common/run-upgrade-scripts line 18.
Can't locate PgCommon.pm in @INC (@INC contains: /usr/share/postgresql-common /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl) at /usr/share/postgresql-common/pg_checksystem line 20.
BEGIN failed--compilation aborted at /usr/share/postgresql-common/pg_checksystem line 20.
Setting up postgresql-contrib-8.4 (8.4.11-0ubuntu0.10.10) ...
dpkg: error processing postgresql-contrib-8.4 (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 postgresql-contrib-8.4
E: Sub-process /usr/bin/dpkg returned an error code (1)

Оффлайн easy2002

  • Заслуженный пользователь
  • Старожил
  • *
  • Сообщений: 2786
  • Мурманск
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #7 : 31 Июля 2012, 11:01:11 »
sudo apt-get install --reinstall postgresql-common postgresql-8.4 postgresql-client-8.4 postgresql-client-common
Tempora mutantur et nos mutantur in illis

Оффлайн djserg-minyar

  • Автор темы
  • Любитель
  • *
  • Сообщений: 68
    • Просмотр профиля
Re: поломался Postgresql
« Ответ #8 : 31 Июля 2012, 11:06:04 »
Спасибо, вроде прошла установка:
# sudo apt-get install --reinstall postgresql-common postgresql-8.4 postgresql-client-8.4 postgresql-client-common
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 4 720kB/4 809kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://ru.archive.ubuntu.com/ubuntu/ maverick-updates/main postgresql-8.4 i386 8.4.11-0ubuntu0.10.10 [3 881kB]
Get:2 http://ru.archive.ubuntu.com/ubuntu/ maverick-updates/main postgresql-client-8.4 i386 8.4.11-0ubuntu0.10.10 [784kB]
Get:3 http://ru.archive.ubuntu.com/ubuntu/ maverick/main postgresql-client-common all 111 [54,6kB]
Fetched 4 720kB in 4s (1 174kB/s)           
Preconfiguring packages ...
Selecting previously deselected package postgresql-8.4.
(Reading database ...
dpkg: warning: files list file for package `postgresql-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-common' missing, assuming package has no files currently installed.
(Reading database ... 144013 files and directories currently installed.)
Preparing to replace postgresql-8.4 8.4.11-0ubuntu0.10.10 (using .../postgresql-8.4_8.4.11-0ubuntu0.10.10_i386.deb) ...
Unpacking replacement postgresql-8.4 ...
Preparing to replace postgresql-client-8.4 8.4.11-0ubuntu0.10.10 (using .../postgresql-client-8.4_8.4.11-0ubuntu0.10.10_i386.deb) ...
Unpacking replacement postgresql-client-8.4 ...
Preparing to replace postgresql-client-common 111 (using .../postgresql-client-common_111_all.deb) ...
Unpacking replacement postgresql-client-common ...
Preparing to replace postgresql-common 111 (using .../postgresql-common_111_all.deb) ...
Unpacking replacement postgresql-common ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up postgresql-client-common (111) ...
Setting up postgresql-common (111) ...
Setting up postgresql-client-8.4 (8.4.11-0ubuntu0.10.10) ...
Setting up postgresql-8.4 (8.4.11-0ubuntu0.10.10) ...
update-alternatives: using /usr/share/postgresql/8.4/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode.
Setting up postgresql-contrib-8.4 (8.4.11-0ubuntu0.10.10) ...

но смущают вот эти ошибки:
dpkg: warning: files list file for package `postgresql-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-8.4' missing, assuming package has no files currently installed.

dpkg: warning: files list file for package `postgresql-client-common' missing, assuming package has no files currently installed.

Пользователь решил продолжить мысль 31 Июля 2012, 11:13:52:
собственно сделал так
apt-get purge postgresql-common postgresql-8.4 postgresql-client-8.4 postgresql-client-common
ну а потом
apt-get install postgresql-common postgresql-8.4 postgresql-client-8.4 postgresql-client-common

и вуаля:
* Starting PostgreSQL 8.4 database server           [OK ]

спасибо большое за помощь  :coolsmiley:
Цитата: easy2002
« Последнее редактирование: 31 Июля 2012, 11:14:50 от djserg-minyar »

 

Страница сгенерирована за 0.082 секунд. Запросов: 25.