Tem erro "Operação do pacote falhou" ao instalar o postgresql usando o software ubuntu center

0

Estou tentando instalar o JDownloader. Mas, ao instalá-lo usando o sudo apt-get install jdownloader , recebi um erro. Assim:

j@ubuntu:~$ sudo apt-get install jdownloader
Reading package lists... Done
Building dependency tree       
Reading state information... Done
jdownloader is already the newest version.
The following package was automatically installed and is no longer required:
  acroread-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up postgresql-9.1 (9.1.9-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server                                       * The PostgreSQL server failed to start. Please check the log output:
2013-05-15 18:52:29 GMT FATAL:  data directory "/var/lib/postgresql/9.1/main" has group or world access
2013-05-15 18:52:29 GMT DETAIL:  Permissions should be u=rwx (0700).
                                                                         [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 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-9.1
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
j@ubuntu:~$

E, tentando o sudo apt-get -f install , isso resultou ...

j@ubuntu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  acroread-common
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 46 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up postgresql-9.1 (9.1.9-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server                                       * The PostgreSQL server failed to start. Please check the log output:
2013-05-15 18:53:13 GMT FATAL:  data directory "/var/lib/postgresql/9.1/main" has group or world access
2013-05-15 18:53:13 GMT DETAIL:  Permissions should be u=rwx (0700).
                                                                         [fail]
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            Errors were encountered while processing:
 postgresql-9.1
 postgresql
E: Sub-process /usr/bin/dpkg returned an error code (1)
j@ubuntu:~$

Eu tentei instalá-lo usando o Ubuntu s / w center , ainda tenho o seguinte erro intitulado Falha na operação do pacote:

installArchives() failed: Selecting previously unselected package postgresql.
(Reading database ... 100%
(Reading database ... 368757 files and directories currently installed.)
Unpacking postgresql (from .../postgresql_9.1+129ubuntu1_all.deb) ...
Setting up postgresql-9.1 (9.1.9-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server
 * The PostgreSQL server failed to start. Please check the log output:
2013-05-15 18:45:26 GMT FATAL:  data directory "/var/lib/postgresql/9.1/main" has group or world access
2013-05-15 18:45:26 GMT DETAIL:  Permissions should be u=rwx (0700).
   ...fail!
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 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-9.1
 postgresql
Error in function: 
Setting up postgresql-9.1 (9.1.9-0ubuntu12.04) ...
 * Starting PostgreSQL 9.1 database server
 * The PostgreSQL server failed to start. Please check the log output:
2013-05-15 18:45:28 GMT FATAL:  data directory "/var/lib/postgresql/9.1/main" has group or world access
2013-05-15 18:45:28 GMT DETAIL:  Permissions should be u=rwx (0700).
   ...fail!
invoke-rc.d: initscript postgresql, action "start" failed.
dpkg: error processing postgresql-9.1 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of postgresql:
 postgresql depends on postgresql-9.1; however:
  Package postgresql-9.1 is not configured yet.
dpkg: error processing postgresql (--configure):
 dependency problems - leaving unconfigured

alguma ajuda para isso? obrigado em adv.

    
por user92674 15.05.2013 / 21:05

1 resposta

2

Execute isto para corrigir permissões:

sudo chmod -R 700 /var/lib/postgresql/9.1/main
sudo chown -R postgres:postgres /var/lib/postgresql/9.1/main

E corra:

sudo apt-get -f install

novamente para concluir a instalação do postgres.

    
por Eric Carvalho 15.05.2013 / 21:11