Re: LD_LIBRARY_PATH ; to set or not to set....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2006-05-17 at 10:16 -0400, James Pifer wrote:
> I'm wrote a small java app that I will run in a jsp. The vendor supplied
> jars also come with shared libraries that are required. Their
> documentation says to set LD_LIBRARY_PATH to the directory where you put
> the libraries. 
> 
> This works fine when running the app from a terminal environment after
> setting LD_LIBRARY_PATH. The problem is that when I run the jsp it's run
> from an application that runs as a service, so LD_LIBRARY_PATH is not
> set in that environment. 
> 
> In searching on this issue I found MANY people saying it's bad to set
> LD_LIBRARY_PATH.
These people are mislead. Setting LD_LIBRARY_PATH adds complexity and
can be error-prone to use, but that's basically all.

A similarily, semi-portable, alternative would be to apply -rpath (c.f.
info ld).

> I've tried running ldconfig -n and the directory but it hasn't seemed to
> work. 
> 
> So what is the proper way to do this?
LD_LIBRARY_PATH, -rpath both are proper ways.

A third and mostly glibc proprietary alternative would be to apply
ld.so.conf rsp. /etc/ld.so.conf.d/ (c.f. man ld.so). It's the way Linux
vendors (e.g. RH) prefer for their packages, but they are problematic
otherwise (e.g. when installing a shared library and not having root
privileges) 

>  I want to set these libraries and
> have them set after a system restart, etc.
For system-wide installation under Linux, ld.so.conf / ldconfig is the
probably is simplest approach.

Ralf


-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux