Ron Mansolino on 16 Sep 2009 04:26:15 -0700


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

Re: [PLUG] Ok, this is really weird. File exists... until I try to execute it


as you've probably figured out; it's not that the shell can't find your executable, it's that your executable can't find something. but what?

there are tools that will "trace" the execution of your program (on my debian, it's /usr/bin/strace)

Script started on Wed 16 Sep 2009 07:24:35 AM EDT
strace ping -c 1 localhost

execve("/bin/ping", ["ping", "-c", "1", "localhost"], [/* 27 vars */]) = 0

brk(0)                                  = 0x84a7000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ef2000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3

etc... this generates a lot of spew, which is why we run it in a "script" session.
but it will tell you which files it's checking status of (or more importantly, where)
run it against things you're familiar with, so you can see how it works
(eg. the "3" on the last line is a filehandle, you may see references later on that use that instead of a name)



On Tue, Sep 15, 2009 at 10:15 PM, Gordon Dexter <gordon@texasdex.com> wrote:
My dad just got an Eee 900 with the default Linux install on it (which I
plan on replacing with Ubuntu soon) and the first thing he wanted to do
is crosswords on it.  The NY Times has a free version of a crossword
program, and it even has a Linux version!  So over the phone I help him
download it, untar it, and try and run it, only it says it doesn't
exist.  So I figure I'm getting confused or something because it's over
the phone, so I try it and, it says it doesn't exist.  It's the
strangest thing I ever saw:

gdexter@buffy:~/Desktop/acl$ ls
acrossl  LICENSE  man  Puzzles  README
gdexter@buffy:~/Desktop/acl$ file acrossl
acrossl: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV),
dynamically linked (uses shared libs), stripped
gdexter@buffy:~/Desktop/acl$ ./acrossl
bash: ./acrossl: No such file or directory
gdexter@buffy:~/Desktop/acl$ ldd acrossl
/usr/bin/ldd: line 117: ./acrossl: No such file or directory
gdexter@buffy:~/Desktop/acl$

I google it and there are forum posts of people having the same problem
with it, and none of them have any solution or even any idea what might
cause that.  There's a file there, no question, but when I try to run it
it's as if it didn't exist!  Has anybody seen this weirdness before?


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug