ubuntu - PostgreSQL server failed to start, could not create lock file: permission denied -
i attempting install , run postgresql server, whenever install using
sudo apt-get install postgresql i following error:
* starting postgresql 9.1 database server * postgresql server failed start. please check log output: 2014-04-03 17:18:16 pdt fatal: not create lock file "/var/run/postgresql/.s.pgsql.5432.lock": permission denied [fail] invoke-rc.d: initscript postgresql, action "start" failed. dpkg: error processing postgresql-common (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of postgresql-9.1: postgresql-9.1 depends on postgresql-common (>= 115~); however: package postgresql-common not configured yet. dpkg: error processing postgresql-9.1 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of postgresql: postgresql depends on postgresql-9.1; however: package postgresql-9.1 not configured yet. dpkg: error processing postgresql (--configure): dependency problems - leaving unconfigured no apport report written because error message indicates followup error previous failure. errors encountered while processing: postgresql-common postgresql-9.1 postgresql e: sub-process /usr/bin/dpkg returned error code (1) i guessing it's permissions issue; how go solving it? running ubuntu 13.10
check owner of /var/run/postgresql , set postgres if not so, type
sudo chown -r postgres:postgres /var/run/postgresql
if user running not have sudo privilege,
1) change root
su -
2) change ownership of /var/run/postgresql postgres user , postgres group
chown -r postgres:postgres /var/run/postgresql
i had same problem when installing postgres on ubuntu 14.04 , changing ownership fixed problem me.
Comments
Post a Comment