dpkg: pacote de processamento de erros postgresql-contrib-9.5 (--configure) - postgresql

1

Precisei reinstalar o postgresql no meu ubuntu14.04 e depois de instalar o postgreql versão 9.5 Estou um pouco preso a esse erro, além disso, tentei e pesquisei algumas soluções, mas não fui Consigo corrigir o problema, mais meu postgresql-9.5-main.log está vazio e isso é algo estranho.

Então, o erro é assim:

Ver Cluster Port Status Owner    Data directory               Log file
9.5 main    5432 down   postgres /var/lib/postgresql/9.5/main /var/log/postgresql/postgresql-9.5-main.log
update-alternatives: using /usr/share/postgresql/9.5/man/man1/postmaster.1.gz to provide /usr/share/man/man1/postmaster.1.gz (postmaster.1.gz) in auto mode
 * Starting PostgreSQL 9.5 database server                                                                               * Failed to issue method call: Unit [email protected] failed to load: No such file or directory. See system logs and 'systemctl status [email protected]' for details.
                                                                                                                 [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing package postgresql-9.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql-contrib-9.5:
 postgresql-contrib-9.5 depends on postgresql-9.5 (= 9.5.7-1.pgdg14.04+1); however:
  Package postgresql-9.5 is not configured yet.

dpkg: error processing package postgresql-contrib-9.5 (--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-9.5
 postgresql-contrib-9.5
E: Sub-process /usr/bin/dpkg returned an error code (1)

Além disso, quando tento me conectar a psql , recebo outro erro:

psql: 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"?

Isso também está acontecendo quando eu quero criar um novo banco de dados com createdb example , então eu tentei a solução desta resposta SO , mas o erro ainda está lá.

Isso é de dpkg -l "postgresql*"

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                     Version           Architecture      Description
+++-========================-=================-=================-=====================================================
un  postgresql-7.4           <none>            <none>            (no description available)
un  postgresql-8.0           <none>            <none>            (no description available)
un  postgresql-9.1           <none>            <none>            (no description available)
iF  postgresql-9.5           9.5.7-1.pgdg14.04 amd64             object-relational SQL database, version 9.5 server
un  postgresql-client        <none>            <none>            (no description available)
ii  postgresql-client-9.5    9.5.7-1.pgdg14.04 amd64             front-end programs for PostgreSQL 9.5
ii  postgresql-client-common 182.pgdg14.04+1   all               manager for multiple PostgreSQL client versions
ii  postgresql-common        182.pgdg14.04+1   all               PostgreSQL database-cluster manager
un  postgresql-contrib       <none>            <none>            (no description available)
iU  postgresql-contrib-9.5   9.5.7-1.pgdg14.04 amd64             additional facilities for PostgreSQL
un  postgresql-doc-9.5       <none>            <none>            (no description available)
un  postgresql-doc-9.6       <none>            <none>            (no description available)

Então alguém pode me explicar o que está acontecendo aqui e como resolver isso, obrigado.

    
por PetarP 07.06.2017 / 15:15

0 respostas