executing missing executable

executing missing executable

Post by cfk » Mon, 23 Jun 2003 07:08:27



Yesterday, I compiled a software package whose executable ended up in a
place I didnt want it. So I deleted the executable and recompiled it to its
normal location, which is at the end of my PATH. Now, bash is telling me (in
RedHat8), that it cannot find the deleted executable (thats right, its
gone). But the proper executable is findable at the directory at the last
statement in PATH.

I was under the impression that bash would search through the entire PATH
before it gave up, but it appears that perhaps a database is being updated
to *help* me. Perhaps the database that 'find' uses?

How would I go about understanding this issue?

--
Charles Krinke
http://home.pacbell.net/cfk

 
 
 

executing missing executable

Post by Bit Twiste » Mon, 23 Jun 2003 07:27:28



> Yesterday, I compiled a software package whose executable ended up in a
> place I didnt want it. So I deleted the executable and recompiled it to its
> normal location, which is at the end of my PATH. Now, bash is telling me (in
> RedHat8), that it cannot find the deleted executable (thats right, its
> gone). But the proper executable is findable at the directory at the last
> statement in PATH.

> I was under the impression that bash would search through the entire PATH
> before it gave up, but it appears that perhaps a database is being updated
> to *help* me. Perhaps the database that 'find' uses?

> How would I go about understanding this issue?

Since you must work for the government, and the software package name
is so Top Secret that you could not provide any information, we cannot
help very much.

Only suggestion I have is to run    
     updatedb    
then do a
     locate -i executable_name_here
and check the results very carefully to verify that the locate
results path is in the PATH, case counts.
Next check the permissions on the executable.

You may want to read http://www.catb.org/~esr/faqs/smart-questions.html

You might use the following to see if someone else had the same
problem.

very large faq search engine
                http://groups.google.com/advanced_group_search
key words(s)    in the first box
*linux*         in the Newsgroup box, pick english

 
 
 

executing missing executable

Post by Sybren Stuve » Mon, 23 Jun 2003 08:13:24


cfk enlightened us with:

Quote:> Yesterday, I compiled a software package whose executable ended up in
> a place I didnt want it. So I deleted the executable and recompiled it
> to its normal location, which is at the end of my PATH. Now, bash is
> telling me (in RedHat8), that it cannot find the deleted executable
> (thats right, its gone). But the proper executable is findable at the
> directory at the last statement in PATH.

type "hash". That should give you the executable locations that Bash
looked for previously. You'll probably see that Bash is still looking
for the excutable in the old location. Type "hash -r" to clear the
command history and try again.

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?

 
 
 

executing missing executable

Post by cfk » Mon, 23 Jun 2003 08:22:24


Dear Bit Twister:
    I just didnt want to clog the newsgroup. The package is Magic. It is the
package used for IC layout. For the past 15 years, since it was originally
was developed at UC Berkeley, it was installed in /home/cad. Recently, Dr.
Edwards, of Magic hacker fame, added a ./configure script. It installs in
/usr/local with the new script. I am testing and debugging Magic with Dr.
Edwards. You can see a bit of his work at
http://bach.ece.jhu.edu/~tim/programs/magic for more information if you are
interested (and I hope you are).

    I did to a 'updatedb' on the system in question, thank you for that tip,
I had forgotten about that command. I then did a 'locate -i magic.' after
that. The reason for the magic. instead of just magic is I get to see too
much info (signal to noise ratio too low). At this point it gets
interesting, in that /home/cad/bin/magic is not found with locate, but if I
go to /home/cad/bin and invoke ./magic, everything works as it did before
yesterday. This is still a bit puzzling to me as the PATH does include
/home/cad/bin at the end and everything was working fine until yesterday.

    Indeed, the updatedb and locate may have something to do with this new
behavior, but so far the details are elusive.

Charles

Quote:

> Only suggestion I have is to run
>      updatedb
> then do a
>      locate -i executable_name_here
> and check the results very carefully to verify that the locate
> results path is in the PATH, case counts.
> Next check the permissions on the executable.

> You may want to read http://www.catb.org/~esr/faqs/smart-questions.html

> You might use the following to see if someone else had the same
> problem.

> very large faq search engine
> http://groups.google.com/advanced_group_search
> key words(s) in the first box
> *linux* in the Newsgroup box, pick english

 
 
 

executing missing executable

Post by cfk » Mon, 23 Jun 2003 08:50:07


Dear Sybren:
    Please accept this marker for one dry cleaning of your wizard hat.
Indeed 'hash -r' is the answer and thank you very much as usual.

Charles


Quote:> cfk enlightened us with:
> > Yesterday, I compiled a software package whose executable ended up in
> > a place I didnt want it. So I deleted the executable and recompiled it
> > to its normal location, which is at the end of my PATH. Now, bash is
> > telling me (in RedHat8), that it cannot find the deleted executable
> > (thats right, its gone). But the proper executable is findable at the
> > directory at the last statement in PATH.

> type "hash". That should give you the executable locations that Bash
> looked for previously. You'll probably see that Bash is still looking
> for the excutable in the old location. Type "hash -r" to clear the
> command history and try again.

> Sybren
> --
> The problem with the world is stupidity. Not saying there should be a
> capital punishment for stupidity, but why don't we just take the
> safety labels off of everything and let the problem solve itself?

 
 
 

executing missing executable

Post by Bit Twiste » Mon, 23 Jun 2003 13:18:12



> Dear Bit Twister:
>     I just didnt want to clog the newsgroup.

I had assumed it was limewire, several people were crying about it.

Quote:>     I did to a 'updatedb' on the system in question, thank you for that tip,
> I had forgotten about that command. I then did a 'locate -i magic.' after
> that. The reason for the magic. instead of just magic is I get to see too
> much info (signal to noise ratio too low).
> At this point it gets
> interesting, in that /home/cad/bin/magic is not found with locate, but if I

try again with     locate -i bin/magic    no period

Quote:> go to /home/cad/bin and invoke ./magic, everything works as it did before
> yesterday. This is still a bit puzzling to me as the PATH does include
> /home/cad/bin at the end and everything was working fine until yesterday.

>     Indeed, the updatedb and locate may have something to do with this new
> behavior, but so far the details are elusive.

Updatedb/locate should not have anything to do with PATH.

There is no database involved with PATH. You should be able to modify
scripts which set PATH and test by doing a  
        su -l cfk  
and     echo $PATH

I wonder if you had something funny in the PATH variable or
you re-exectued your profile which still could contain the old
information in the middle of the PATH and the end would look ok.

 
 
 

executing missing executable

Post by Sybren Stuve » Mon, 23 Jun 2003 20:07:20


cfk enlightened us with:

Quote:> Please accept this marker for one dry cleaning of your wizard hat.

Happily accepted! ;-)

Quote:> Indeed 'hash -r' is the answer and thank you very much as usual.

That's good to hear!

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?

 
 
 

1. executable won't execute

Hi all.

This is a dumb question to which I couldn't find the answer in any FAQ
or Linux
manual.

I've just setup my RedHat 5.2 and wanted to try out the f77 compiler.
Well, I wrote
a two liner that prints a real. The compiler spits out an a.out with the
right permissions

...
-rwxrwxr-x   1 udrea    udrea       65733 Dec 13 23:02 a.out
...

but linux says that a.out is not found as a command. I've tried it as
root also with the
same result.

Am I missing something fundamental here?

2. unknown log entries (need help)

3. Can't execute files that are executable

4. Should there be a GNU "small" shell, period?

5. can't execute an executable file.....

6. modem conexant : Help!

7. Executable does not execute

8. How do I rename directories

9. using popen to execute and feed input to set of executable files

10. Symbols from Linked Shared Libraries missing from the executable in a certain scenario.

11. missing bit of non-executable data patch

12. Executable is not executable

13. Loading an executable from within an executable