Forum OpenACS Q&A: openacs seems to install successful.but still have problem about load lib.

[17/May/2013:01:52:35][11010.3074049728][-main-] Warning: modload: could not find Ns_DbDriverInit in /usr/lib/aolserver4/bin/nspostgres.so
[17/May/2013:01:52:35][11010.3074049728][-main-] Error: dbdrv: failed to load driver 'postgres'
[17/May/2013:01:52:35][11010.3074049728][-main-] Error: dbinit: no such default pool 'pool1'
how did you install OpenACS? did you compile everything yourself, or did you use a packaged version?
I using ubuntu12.04 and install by apt-get,process are:
0. apt-get update
1. apt-get install postgresql
2. apt-get install openacs
hmm, i have no ubuntu to check whether the install still does what it used to do.

Make sure,
- that apt-get did install the package aolserver4-nspostgres
- that postgres is up and running when you start openacs (postmaster should be listening on port 5432 in the default configuration)

i remember reports, that there was a timing problem for first debian/ubuntu installs, where openacs was starting before postgres was up and running. See e.g. end of thread https://openacs.org/forums/message-view?message_id=138993

Most likely you were hit by a bug in the Debian ports of the aolserver modules. The issue came up lately on the Aolserver mailing list for a different module [1].

In short: at least ion Ubuntu, the build system has added the default optimization flag "-Wl,--as-needed" lately. This optimization removes symbols which are not needed for linking. Therefore, the symbol Ns_DbDriverInit is probably removed this way, but is is necessary for the dynamic loading in Tcl.

To fix the issue, the Debian maintainer has to add "-Wl,--no-as-needed" to the CFLAGs in the Makefile before compiling. A bug report is filed for debian.

-gustaf neumann

[1] http://www.mail-archive.com/aolserver-talk@lists.sourceforge.net/msg00272.html
[2] http://stackoverflow.com/questions/14329967/missing-a-library-in-ldd-after-using-gcc-l