[plug] library paths, Debian

Denis Brown dsbrown at cyllene.uwa.edu.au
Fri Jul 4 15:35:57 WST 2003


Dear PLUG list members,

Googling hasn't been too helpful so far on this.  General questions: what 
sets up the library paths for an application/library and where is that 
magic smoke located?   Specific question: when installing PostgreSQL from 
tarball, zlib cannot be found even though it is present as part of the kernel.

Details:
Debian GNU/Linux woody installed from Miniwoody (LordSutch) CD
Kernel 2.4.21 with zlib, RAID support and customised for my hardware of 
course :-)
Packages updated, including security, using apt-get mechanism.   Includes 
the usual C, Perl, Python, blah, blah.   This will be a server so no X 
stuff.   No Apache, this added as below.

Added from tarballs:  Perl 5.8.0,  Apache 2.0.46,  PostgreSQL 7.3.3, will 
add PHP 4 to the list later.

Followed instructions for installing Perl and Apache (with later intention 
of installing mod_perl).   All seemed okay.   Attempted to configure 
PostgreSQL - complained about readline library not found.   Added 
readline4-dev using apt-get method, now that's fine.   Then PG 
configure  complained about zlib library not found.

Okay, dselect'd [1] zlib1g-dev, but it seemed to flash up messages that it 
was adding other packages as well - dependencies most likely.   Now 
PostgreSQL builds, tests and installs nicely.

And so this would end the happy tale, but there's more!   Before that, 
though, given that I have references to the libraries (readline, etc) in 
/etc/ld.so.conf and I have ldconfig'd, why would the PG configure not have 
been happy?   What else needs to be set up to have libraries 
recognised?   I have seen some discussion thanks to Google's finds, on why 
setting LD_LIBRARY_PATH is not a universal panacea.  So, what else is 
there?   Point me at a tutorial, please, somebody!


The PG installation started to go pear shaped when I got to the point where 
it wants root to "adduser postgres", at which point the adduser script is 
pointing to the new 5.8.0 perl and is unhappy about it, like so:
- - - - - - - -
Can't locate Debian/AdduserCommon.pm in @INC (@INC contains: 
/usr/local/lib/perl5/5.8.0/i686-linux /usr/local/lib/perl5/5.8.0 
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux 
/usr/local/lib/perl5/site_perl/5.8.0 /usr/local/lib/perl5/site_perl .) at 
/usr/sbin/adduser line 68.
BEGIN failed--compilation aborted at /usr/sbin/adduser line 68.
- - - - - - - -

I've had a bit of a grep around to see if I can see those paths 
somewhere.  If I can find out where that @INC string is I could change 
it.   The target, Debian/AdduserCommon.pm is in the /usr/share/perl5 
directory but there's nothing to indicate the presence of any specific perl 
version (5.6.x, 5.8.x, whatever.)   Debian's "alternatives" scheme is a bit 
too much for my brain at this stage on a Friday; besides, I'd like to 
understand what's going on here rather than apply a layer of repair.

The odd thing is that I've set up installations of Apache, Perl, PHP, 
PostgreSQL in the past and they've "just worked."   But for those I had 
done the Debian-floppy install and dselect for somewhat more in the way of 
development packages so the manipulation of library strings were probably 
done much more sanely and automatically than here.   The MiniWoody CD gave 
me a pretty much workable system directly so maybe I got lazy in my 
dselect'ing.  Any thoughts sincerely appreciated.

TIA,
Denis

[1] so I'm old fashioned!   Apart from the intimidating array of packages 
in Deb, I find dselect is a pretty straight forward method.  Shrug.




More information about the plug mailing list