PATH and LD_LIBRARY_PATH setting error on Linux
Hi ,
I am getting some errors of "/usr/lib/libcap.so.2": Invalid operation when i set LD_LIBRARY_PATH = LD_LIBRARY_PATH=/usr/lib:/lib64:/lib:/opt/trs/lib64:/usr/lib64:/lib64:/lib:/opt/trs/lib64:/opt/CCS:/opt/som/lib64: and PATH = export PATH=/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/trs/bin:/opt/trs/bin:/sbin:/usr/sbin:/usr/bin:/bin:/flash/bin:/opt/som/bin: It is because libcap.so.2 library is present at both the path /opt/trs/lib64 and /usr/lib. As per the requirement library should be picked from /opt/trs/lib64. But if i set export LD_LIBRARY_PATH=/opt/trs/lib64:/usr/lib64:/lib64:/lib:/opt/trs/lib64:/opt/CCS:/opt/som/lib64:/usr/lib:/lib64:/lib: and PATH = PATH=/opt/trs/bin:/opt/som/bin:/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/trs/bin:/opt/trs/bin:/sbin:/usr/sbin:/usr/bin:/bin:/flash/bin:/opt/som/bin: then i get segmenttation fault by executing the ls command on shell. Can any one help me how to these path so that i can avoid these error. |
Hi!
First of all, you cannot use whitespace when assigning variables in Bash. Code:
FOO=BAR # This works http://www.troubleshooters.com/linux/prepostpath.htm Best regards, HMW |
Quote:
is in /usr/lib AND in /opt/trs/lib64 the order of being used is FIRST COME FIRST SERVED you have the needed and REQUIRED "/usr/lib ( a 32 bit folder!!!! ) coming before the 64 BIT /opt/trs/lib64 so you WILL have issues the 32 bit one is being used rename the one you placed in "/opt/trs/lib64 " or explicatly call it in your build line or configure.in or manually Code:
export LD_LIBRARY_PATH=/opt/trs/lib64:$LD_LIBRARY_PATH on 64 bit MULTI lib systems it is best to make 100 SURE that the 64 bit libs are seen FIRST by gcc not everything dose a good job checking 32 VS 64 bit in /etc/profile.d write a script or ( and this can be undone by updates ) edit /etc/profile or if /etc/profile is set to look for a "/etc/profile.local" file make one ( this will not be undone by updates) -- profile.local Code:
PATH=$PATH:-- set them to YOUR system then reboot and CHECK IT!!! Code:
echo $LD_LIBRARY_PATH |
All times are GMT -5. The time now is 05:06 AM. |