Re: New User: PostgreSQL Setup - "The Program 'postgress' is needed by initdb but was not found in the same directory..."

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Patrick Kevin McCaffrey <pkm(at)uwm(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: New User: PostgreSQL Setup - "The Program 'postgress' is needed by initdb but was not found in the same directory..."
Date: 2011-12-18 04:25:47
Message-ID: 21362.1324182347@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Patrick Kevin McCaffrey <pkm(at)uwm(dot)edu> writes:
> I'm new to PostgreSQL, but am trying to set up a server on my machine. The PostgreSQL server is to run inside of a LXC container - I'm not sure if this is contributing to my problem or not, but it's worth mentioning. The main OS (host) of my machine is Ubuntu 11.10 (mostly, some packages are updated to newer versions), and my guest OS (inside the container) is Debian. I compiled PostgreSQL from source, and installed it inside the container. However, I did have to use the "without zlib" and "without readline" options to compile. This is strange, as both libraries are installed (confirmed via aptitude).

I don't know Ubuntu at all, but on many Linux distributions the problem
would likely be that you don't have the "-devel" or "-dev" subpackages
installed for zlib and readline. The base package is enough to run
programs against the library, but not enough to compile against.

> I'm following the instructions that come with the source, and am stuck on this line:

> /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data

> When I run it, I get the following:

> sh: cannot create /dev/null: Permission denied

That's bizarre. I don't know much about LXC either, but it sounds like
it's not providing /dev/null to programs inside the container. That's
pretty nasty :-(. You might consider trying to get PG running without
a container first, so as to debug one problem at a time.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Yan Chunlu 2011-12-18 14:18:28 pg_dump and pg_restore make data dir doubled size?
Previous Message Chris Angelico 2011-12-18 03:05:59 Re: Performance question: Commit or rollback?