I'm running into this issue when trying to set up a PostgreSQL server inside one of my containers. The Postgre mailing list seems suspect of my LXC setup, so I thought I'd see if anyone has any input. The outline of my problem is below. I've got Postgre installed/configured, but I can't run the "initdb" command as seen below...
----- Forwarded Message ----- From: "Tom Lane" <t...@sss.pgh.pa.us> To: "Patrick Kevin McCaffrey" <p...@uwm.edu> Cc: "Steve Atkins" <st...@blighty.com>, "PostgreSQL General" <pgsql-gene...@postgresql.org> Sent: Monday, December 19, 2011 3:01:20 PM Subject: Re: [GENERAL] New User: PostgreSQL Setup - "The Program 'postgress' is needed by initdb but was not found in the same directory..." Patrick Kevin McCaffrey <p...@uwm.edu> writes: >> 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 > This line suggests that your environment is broken - the chroot container > hasn't been set up fully. >> fgets failure: Success > This isn't good, either. I'm suspicious of your lxc chroot. >> The program "postgres" is needed by initdb but was not found in the >> same directory as "/usr/local/pgsql/bin/initdb". > This suggests that your build broke. Is there a /usr/local/pgsql/bin/postgres > binary? I think nobody pointed out yet that those last two messages are almost certainly direct results of the first one. initdb tries to verify that the postgres binary is of a matching version by doing (more or less, this isn't cut-and-pasted from the sources) system("postgres -V 2>/dev/null") and seeing what version string it gets back. If /dev/null isn't writable inside your LXC chroot, then the shell will fail to execute that command (producing the first error message), and what initdb will get back is only an empty string, which I think explains the "fgets" whinge and definitely explains the wrong-version complaint. regards, tom lane --------------------------------------------------------------------- Any and all help would be appreciated. My containers all seem to be working fine otherwise. The only thing I've really got set up at this point is email (Dovecot/Postfix), but it's functioning fine in a container that was constructed in the same way that this one (for Postgre) was. Pat ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users