Forum OpenACS Q&A: aolserver loading postgres.so driver

Collapse
Posted by Tim Holzmann on
Running; AOLserver 3.0R1, PostgreSQL 7.0beta3, Linux 6.1, and a build
of 8-as-pg-driver. Postgres.so built succesfully. I run aolserver as
nsd76 under "nsadmin" superuser and the postgres.so driver fails to
load with the following: "could not
load /webtools/aolserver/bin/postgres.so: libpq.so.2.1: cannot open
shared object file: No such file or directory" I setup a link to
libpq.so.2.1 from libpq.so.2.0, the files are in /webtools/pgsql/lib.
I've tried changing ownership/permission on libpq.so.2.1 without
luck. AOLserver loads everything else and runs. How is AOLserver
initialized to the location of libpq.so.2.0, /webtools/pgsql/lib ?
Collapse
Posted by Ben Adida on
You need to either set up your LD_LIBRARY_PATH when you execute nsd, or, since you're on Linux, edit your /etc/ld.so.conf file to include the PGSQL lib directory. This is explained in the Postgres install documents. Hope this helps!
Collapse
Posted by Phillip Harrington on
I was having the same problem. I'm on RH Linux 6.0. After editing /etc/ld.so.conf, it was necessary to do /sbin/ldconfig (like it says in the handy untar_dir/INSTALL file). Then I restarted AOLserver and everything was fine, but I had a further problem.

While trying to register I got a dml error. The log said: [03/Apr/2000:11:01:52 -0400][2117.2120][-Scheduler-] Error: Ns_PgExec: result status: 7 message: ERROR: stat failed on file '/usr/lib/pgsql/plpgsql.so': No such file or directory

To fix it I did: ln -s /usr/local/pgsql/lib /usr/lib/pgsql

Everything worked great after that. Hope this helps others!

Collapse
Posted by Lamar Owen on
RE: plpgsql.so location.
Sounds like Phillip made the edit for the RPM postgresql, and is running with the non-RPM postgresql tarball installation.

/usr/lib/pgsql is where the RPM puts some of the PostgreSQL files, including pltcl.so and plpgsql.so.

Collapse
Posted by Brent Fulgham on
In the immortal words of Ben Adida himself:

==============================================

/usr/local/pgsql/lib/plpgsql.so is the file that allows PLPGSQL stored procedures. This gets loaded by www/doc/sql/postgres.sql to  enable these stored procedures. If you look into that file, you'll  see that you should fix the path to that plpgsql.so depending on  your Postgres installation (/usr/lib/pgsql/plpgsql.so just needs to be uncommented).

Now, the reason why you're getting these errors is because all of your stored procedures loaded incorrectly since you didn't create the PLPGSQL language at the start.

Once you've fixed your postgres.sql file, your best bet is to drop the whole data model and rebuild it. You should then be fine :)

=========================================

And that's all I have to say about that.  😊

-Brent Fulgham

Collapse
Posted by Tom Kruhlmann on
Just some words that may be usefull 😊
I installed on SUSE 63, AOLserver 3Rc1 and had the same problem with the load of the postgres driver.
I realized, that I was running nsd82 instead og nsd76. When I changed that all was fine.
(I am using the "wimpy" LD_LIBRARY_PATH option by the way.

Thanks for a SUPER port of ACS!

Tom