PDA

Bekijk de volledige versie : Weird LD_LIBRARY_PATH problem



wirespot
10-03-2007, 00:06
My 500gP is acting up. My default LD_LIBRARY_PATH is, as always, equal to "/opt/lib:".

All of a sudden, if I try to execute a file from somewhere under root (/) from under a shell script executed via Busybox, I get "permission denied". Example:
# echo "ls -l" > test.sh
# sh test.sh
test.sh: test.sh: 1: ls: Permission denied

If I change LD_LIBRARY_PATH to just "/lib", suddenly the shell script problem is fixed, but now some /opt programs are segfaulting. Probably because they were linked with /opt/lib/ libraries and now they're forced to use /lib stuff.

I don't recall anything I've done to make this happen. I've done an ipkg upgrade but I don't remember if uclib was affected. I'm using Oleg's 1.9.2.7-7g-pre1.

wirespot
10-03-2007, 00:15
Nevermind. I've set LD_LIBRARY_PATH to nothing and now everything works fine. I'm just wondering why all of a sudden having it set to /opt/lib caused problems. But it's good that it's working again.