In trying to install an already existing OACS 4.5 setup on a new RedHat 8.0 server with Aolserver 3.5.1 and postgresql 7.2.3 (and not wanting to use RPMS). Everything would run fine if it run by nsadmin, but if run as root (to use port 80), I would get:
[07/Feb/2003:17:08:13][1126.8192][-main-] Warning: modload: failed to load '/usr/local/aolserver/bin/postgres.so': 'libpq.so.2: cannot open shared object file: No such file or directory'
This has been discussed before (here, here,
here, and here) but none of these threads really provided an answer (This could be read as an answer but isn't really specific enough).
As mentioned elsewhere, I created a link from libpq.so.2 to libpq.so.2.2 and the permissions looked right:
lrwxrwxrwx 1 postgres web 12 Feb 4 18:42 libpq.so -> libpq.so.2.2
lrwxrwxrwx 1 postgres web 12 Feb 4 18:42 libpq.so.2 -> libpq.so.2.2
lrwxrwxrwx 1 postgres web 12 Feb 6 19:25 libpq.so.2.0 -> libpq.so.2.2
-rwxr-xr-x 1 postgres web 71326 Feb 4 18:42 libpq.so.2.2
But the problem turned out to be permissions on /usr/local/pgsql, which were 750 and needed to be 755:
]# ls -la /usr/local/pgsql
drwxr-x--- 8 postgres web 4096 Feb 4 18:46 .
drwxr-xr-x 15 root root 4096 Feb 4 18:27 ..
drwxr-xr-x 2 postgres web 4096 Feb 4 18:42 bin
drwxr-xr-x 4 postgres web 4096 Feb 4 18:46 doc
drwxr-xr-x 4 postgres web 4096 Feb 4 18:42 include
drwxr-xr-x 2 postgres web 4096 Feb 6 19:25 lib
chmod a+rx /usr/local/pgsql fixed the problem, but raises the question: if you're running aolserver with -g web, why can't it read /usr/local/pgsql with the default, group-readable permissions?