LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ls -la Segmentation Fault (https://www.linuxquestions.org/questions/linux-newbie-8/ls-la-segmentation-fault-442765/)

halturata 05-08-2006 08:36 AM

ls -la Segmentation Fault
 
Here's the situation:
I want to list the contents of a directory full of shared libraries.
When I type 'ls -la' I either get:
Code:

[root@host lib]# ls -la
Segmentation fault

or
Code:

[root@host lib]# ls -la
ls: error while loading shared libraries: ./libtermcap.so.2: ELF file data encoding not little-endian

What's wrong with it? The shared libraries are for a PowerPCa and my host is x86...
And the libtermcamp.so.2 file is somewhere at the end of the listing (I checked it with Konqueror). There ~60 shared llibraries in that directory...
Does the 'ls' command tries to load the libraries???

Thanks.

visaris 05-08-2006 10:13 AM

You mave hav LD_LIBRARY_PATH="." set.

Instead of trying to list the contents of the directory from within the directory, list the contents of 'lib' from lib's parent:

Code:

[root@host lib]# cd ..
[root@host whatever] ls -la ./lib/


halturata 05-09-2006 01:31 AM

Yes, that works. But I found the cause of it - I'd put a lot of aliases in my .zshrc file, and some of them overlap the names of existing commands (like pp, the perl packager and cc...)
No comments, me master n00b... :jawa:


All times are GMT -5. The time now is 09:36 PM.