Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install JDownloader. But, while installing it using sudo apt-get install jdownloader, I got some error. Like this:

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:~$

And, trying sudo apt-get -f install resulted this..

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:~$

I have tried to install it using Ubuntu s/w center, still got following error entitled Package Operation Failed:

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

any help for this? thanks in adv.

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Run this to fix permissions:

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

And run:

sudo apt-get -f install

again to finish postgres installation.

share|improve this answer
    
thnks, got d error fixed... nw its installed successfully... –  user92674 May 15 '13 at 19:48
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.