Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install PostgreSQL 9.1 on a Debian Squeeze server using Backports, but after installation I don't have the /etc/postgresql folder, instead I've got a /etc/postgresql-common folder.

Is there something I'm doing wrong? According to the Debian Wiki I should have a /etc/postgresql/9.1/ folder.

share|improve this question

migrated from stackoverflow.com Sep 13 '12 at 8:19

This question came from our site for professional and enthusiast programmers.

    
Funny. I had this once, when I tried to aptitude install the postgres package, but removing and installing with apt-get did work. I'ts a package issue. Report the bug. –  ansi_lumen Sep 12 '12 at 7:51
    
@ansi_lumen you may post that as answer not as comment. –  kmindi Sep 12 '12 at 8:43
    
It probably means that the PG cluster initialization failed. See the result of pg_lsclusters. For a more informed answer, include the commands you type and the output result you get when installing the package. –  Daniel Vérité Sep 12 '12 at 21:01
    
@DanielVérité I think pg_lsclusters is driven off /etc/postgresql unless there's something really non-vanilla about the install. –  couling Sep 12 '12 at 22:34

3 Answers 3

I don't mean to be patronizing here, but just create it.

Without an initialized cluster it really is just an empty directory. The most likely thing is that you don't have a cluster created (see what's in /var/lib/postgresql).

You can use (sudo) mkdir /etc/postgresql /etc/postgresql/9.1 to create the directory.

Then use (sudo) pg_createcluster 9.1 main to create your DB cluster (called main). Once created you will have a /etc/postgresql/9.1/main directory with the settings for that cluster.

Once you have your cluster use the (sudo) pg_ctrlcluster 9.1 main start to get the cluster up and running.

share|improve this answer

I had the same problem, and couldn't fix it by simply removing and re-installing. The problem was related to the fact that postgresql is a metapackage. The fix (as detailed here) was to purge everything using a wildcard:

apt-get --purge remove postgresql\*

and the re-installing.

share|improve this answer

Funny. I had this once, when I tried to aptitude install the postgres package, but removing, purging and installing with apt-get did work. I'ts a package issue. Report the bug.

dpkg -c /var/cache/apt/archives/[PACKAGE-NAME].deb shows what is in the package and supposed to get installed.

Otherwise you may have luck with some ubuntu packages. And in the end it's not hard to build and with checkinstall you can easyly create your own packages and delete the sources.

share|improve this answer

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.