Bizarre shell problem. Please help

Bizarre shell problem. Please help

Post by Servet Ahmet Cizmel » Sun, 31 Dec 1899 09:00:00



Hi all,

I just installed Redhat 7.0. I would like to run a program that is
called lmhostid but the shell would not find it :


bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

however the file exists with correct execution permissions


-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
/usr/local/matlab5/etc/lnx86/lmhostid

I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

any help would be greatly appreciated
thanks from advance
peace

 
 
 

Bizarre shell problem. Please help

Post by Vilmos Sot » Sun, 31 Dec 1899 09:00:00




> bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

> however the file exists with correct execution permissions


> -rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
> /usr/local/matlab5/etc/lnx86/lmhostid

> I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

Check with ldd which libraries this program uses. There is a good
chance the loader cannot find one library.

Also, you can use strace on the binary to check out what file it
doesn't find, but first, use the ldd command. That is much simpler
to decipher than strace's output.

Vilmos

 
 
 

Bizarre shell problem. Please help

Post by Kurt R. Rahlf » Sun, 31 Dec 1899 09:00:00





> > bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

> > however the file exists with correct execution permissions


> > -rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
> > /usr/local/matlab5/etc/lnx86/lmhostid

> > I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

> Check with ldd which libraries this program uses. There is a good
> chance the loader cannot find one library.

> Also, you can use strace on the binary to check out what file it
> doesn't find, but first, use the ldd command. That is much simpler
> to decipher than strace's output.

> Vilmos

Also check the permissions of the directories under lmhostid.  They must be
r_x for each of the appropriate users (user, group and other).
 
 
 

Bizarre shell problem. Please help

Post by Colin Wats » Sun, 31 Dec 1899 09:00:00




>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

>however the file exists with correct execution permissions


>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
>/usr/local/matlab5/etc/lnx86/lmhostid

>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

If it's a script, the first line of the file will start with the two
characters '#!'. Check that the rest of that line points to an existing
file.

--

"How can you tell an extroverted software engineer?"
"He looks at *your* shoes when he talks to you."

 
 
 

Bizarre shell problem. Please help

Post by Loren Brooke » Mon, 16 Oct 2000 08:58:17



>Hi all,

>I just installed Redhat 7.0. I would like to run a program that is
>called lmhostid but the shell would not find it :


>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

>however the file exists with correct execution permissions


>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
>/usr/local/matlab5/etc/lnx86/lmhostid

>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

My guess would be that the file you are trying to run is a script, and it is
looking for a file, and not finding it. i.e. the error message refers to some
file other than the one you are running. If this is so you need to open
lmhostid with a text editor and look for the file refered to in it.

If it is not a script it may still be looking for some file in the wrong place.
Maybe there's some environment problem.

Maybe you could just uninstall and then reinstall the program, that does work
sometimes.  

Hope this helps.

Loren Brookes

- Show quoted text -

Quote:>any help would be greatly appreciated
>thanks from advance
>peace

 
 
 

Bizarre shell problem. Please help

Post by Spagne » Sun, 31 Dec 1899 09:00:00


If the problem is as Loren Brookes describes, open the file lmhostid in a
text editor and see if the first line is something like #!/bin/bash.  If so,
edit the file and change this line to #!/bin/bash -x.  The -x will enable
debugging.  When the file is ran, you'll see a lot of debugging code dumped
to the screen, which should help you figure out if some command within the
file is causing the problem.

-dnult



>>Hi all,

>>I just installed Redhat 7.0. I would like to run a program that is
>>called lmhostid but the shell would not find it :


>>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

>>however the file exists with correct execution permissions


>>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
>>/usr/local/matlab5/etc/lnx86/lmhostid

>>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

>My guess would be that the file you are trying to run is a script, and it
is
>looking for a file, and not finding it. i.e. the error message refers to
some
>file other than the one you are running. If this is so you need to open
>lmhostid with a text editor and look for the file refered to in it.

>If it is not a script it may still be looking for some file in the wrong
place.
>Maybe there's some environment problem.

>Maybe you could just uninstall and then reinstall the program, that does
work
>sometimes.

>Hope this helps.

>Loren Brookes

>>any help would be greatly appreciated
>>thanks from advance
>>peace

 
 
 

Bizarre shell problem. Please help

Post by mpulli » Sun, 31 Dec 1899 09:00:00



>>I just installed Redhat 7.0. I would like to run a program that is
>>called lmhostid but the shell would not find it :


>>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

In my Red Hat (not 7.0) /usr/local is not on the default
PATH. Not sure what 7.0 has for the default path.

Check and see if you don't need to add /usr/local
to your path.

MP

 
 
 

Bizarre shell problem. Please help

Post by Servet Ahmet Cizmel » Tue, 17 Oct 2000 09:02:24



> Check with ldd which libraries this program uses. There is a good
> chance the loader cannot find one library.

OK! Let me begin from the beginning. I try to run the file


-rwxr-xr-x   10 106      users      219264 Oct 31  1997
/usr/local/matlab5/etc/lnx86/lmhostid

like this

bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

this file is an executable

/usr/local/matlab5/etc/lnx86/lmhostid: ELF 32-bit LSB executable, Intel
80386, v
ersion 1, dynamically linked (uses shared libs), stripped

and ldd (or whoever is supposed to find it) cannot find it either

/usr/bin/ldd: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or
directory

 > Also, you can use strace on the binary to check out what file it

Quote:> doesn't find, but first, use the ldd command. That is much simpler

OK. strace gives a little more information but I think it has the same
problem as well.


execve("/usr/local/matlab5/etc/lnx86/lmhostid",
["/usr/local/matlab5/etc/lnx86/lmhostid"], [/* 28 vars */]) = 0
strace: exec: No such file or directory

I checked the permissions and they seem OK
ls -l  /usr/local/matlab5/etc/
drwxrwxr-x    2 root     root         4096 Oct 16 00:49 lnx86

This problem is clearly beyound my limits.
Please help me!
Thanks a lot from advance
Servet

 
 
 

Bizarre shell problem. Please help

Post by Vilmos Sot » Tue, 17 Oct 2000 11:44:45


>>> Check with ldd which libraries this program uses. There is a good
>>> chance the loader cannot find one library.

>> OK! Let me begin from the beginning. I try to run the file
>> ...
>> like this

>> bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory
>> ...
>> This problem is clearly beyound my limits.
>> Please help me!

> You tried all the right things... and it still doesn't work. My
> guess is that the file looks enough like an executable to make
> "file" think it is ("file" only looks at the first few bytes),
> but is actually damaged or corrupt beyond that point. When you
> straced, execve got it and probably returned ENOEXEC (Exec Format
> Error) when it tried to load it. So, is there any way you can
> check the integrity of the file? I assume you didn't compile it
> yourself; can you compare checksums (cksum) with whoever did?

This is a very good advice. I would also add that make sure that
there is not a bad disk block under the file. Also, make sure
that the file is not located on a filesystem which was mounted
with the noexec flag.

However, I have to admit that it is strange that even ldd doesn't
show the libraries.

Vilmos

 
 
 

Bizarre shell problem. Please help

Post by Black Drag » Tue, 17 Oct 2000 11:52:08


On Mon, 16 Oct 2000 00:02:24 GMT in comp.os.linux.setup,

>OK! Let me begin from the beginning. I try to run the file


>-rwxr-xr-x   10 106      users      219264 Oct 31  1997
>/usr/local/matlab5/etc/lnx86/lmhostid

No guarantees here. . .

Check the file attributes with "lsattr". A file with an `a' attribute
can only be opened for writing, and only root can change it.

See also: the man pages for "lsattr" and "chattr".

--
Black Dragon

 
 
 

Bizarre shell problem. Please help

Post by Paul Kimo » Tue, 17 Oct 2000 14:00:43



> bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

> this file is an executable

> /usr/local/matlab5/etc/lnx86/lmhostid: ELF 32-bit LSB executable, Intel
> 80386, v
> ersion 1, dynamically linked (uses shared libs), stripped

Please run
$ strings /usr/local/matlab5/etc/lnx86/lmhostid | egrep 'ld.*\.so'

If it replies with the name of a file, see whether your system contains
that file.

--
Paul Kimoto
This message was originally posted on Usenet in plain text.  Any images,
hyperlinks, or the like shown here have been added without my consent,
and may be a violation of international copyright law.

 
 
 

Bizarre shell problem. Please help

Post by Jeff » Tue, 17 Oct 2000 14:16:54


or just run it like this from the command line without editing your file
using sh -xve your_file.

Of coarse if you do edit your file (anyfile) you do check it in to RCS first
right? So that you have a backup copy.

man RCS

RCS is a very handy tool especially when you start mucking around with
files.  Not only do you get a backup of your file, if you comment your edits
and save after each checkin you endup with a nice revision history.  I am
sorry this is a personal point I have to make to anyone before ever
suggesting a way to troubleshoot a file that could cause you heartburn if
corrupted or lost.  It is my disclaimer to you that at least I tried to not
just warn you about backing up a file but showed you how to do it.

in the dir where the file exists.
    mkdir RCS
    ci -l your_file
    .
to check out a file from RCS
    co -l your_file

OK lets move on ...

sh -xve  /usr/local/matlab5/etc/lnx86/lmhostid

(hopefully you have your environment setup so that you don't have to use
this fully qualified path to your app, but to be safe I gave you the command
as you exampled it in a previous post)

Assuming that as the other contributors stated that this is a simple shell
script,  you can execute it with sh -xve

 -x    will show you what is being actually being executed at that time
 -v    verbose line by line output of the script being as it is executed and
any messages produced
 -e    will halt execution upon the first error encountered

with this you can "watch" the script execute and then see if it errors out
and where.  Look at the line and the command that it errors on correct it
and re-run the script again repeating the process as needed until it
executes without issue.

L8TR


> If the problem is as Loren Brookes describes, open the file lmhostid in a
> text editor and see if the first line is something like #!/bin/bash.  If
so,
> edit the file and change this line to #!/bin/bash -x.  The -x will enable
> debugging.  When the file is ran, you'll see a lot of debugging code
dumped
> to the screen, which should help you figure out if some command within the
> file is causing the problem.

> -dnult




> >>Hi all,

> >>I just installed Redhat 7.0. I would like to run a program that is
> >>called lmhostid but the shell would not find it :


> >>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

> >>however the file exists with correct execution permissions


> >>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
> >>/usr/local/matlab5/etc/lnx86/lmhostid

> >>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN

> >My guess would be that the file you are trying to run is a script, and it
> is
> >looking for a file, and not finding it. i.e. the error message refers to
> some
> >file other than the one you are running. If this is so you need to open
> >lmhostid with a text editor and look for the file refered to in it.

> >If it is not a script it may still be looking for some file in the wrong
> place.
> >Maybe there's some environment problem.

> >Maybe you could just uninstall and then reinstall the program, that does
> work
> >sometimes.

> >Hope this helps.

> >Loren Brookes

> >>any help would be greatly appreciated
> >>thanks from advance
> >>peace

 
 
 

Bizarre shell problem. Please help

Post by John » Tue, 17 Oct 2000 14:32:36





>>bash: /usr/local/matlab5/etc/lnx86/lmhostid: No such file or directory

>>however the file exists with correct execution permissions


>>-rwxr-xr-x   10 acizmeli users      219264 Oct 31  1997
>>/usr/local/matlab5/etc/lnx86/lmhostid

>>I AM COMPLETELY STUCK. WHY WOULD THE SHELL NOT FIND THIS FILE TO RUN
> If it's a script, the first line of the file will start with the two
> characters '#!'. Check that the rest of that line points to an existing
> file.

Colin takes the prize. Pity he didn't offer evidence;-)



#!/bin/MisshingShell
ls -l



bash: bin/noshell: No such file or directory

This looks to me just like the original error.

--

 
 
 

1. Please help me with kppp. Very bizarre problem!

Hello,

I am running RH 6.0 with kernel 2.2.5-15. I have configured kppp to get
a ppp connection.
If I use telnet to test the setup then everything works up to
Connected to <hostname>
but then no login prompt comes up. ftp exhibits a similar behaviour.
What on earth could cause this problem????

To make matters even stranger: if I use netcfg then I can make a
correctly behaving ppp connection using ifup ppp0. So pppd is not the
problem.

I have used kppp under Mandrake 5.1 with kernel 2.0.35 without any
problem.

I would be extremely grateful for help as this is driving me mad.

Thx in advance,
Michel

2. mounting root from ufs:/dev/md0c

3. PLEASE PLEASE HELP Major problem with my SCSI & Redhat 5.0 PLEASE Help

4. Spider-Lynx64 Video card

5. Sendmail problems. Please please please please help!

6. select()

7. Utterly bizarre behaviour - long, possibly entertaining - please help

8. Simple VI/EX question.......

9. LINUX instalation problems, PLEASE HELP !?!Subject: LINUX , instalation problems, PLEASE HELP !?!

10. Please help: Bizarre CGI.pm + apache error.

11. Bizarre: Sendmail Connects Then Times Out...Sendmail Gurus Please Help

12. bizarre telnet issues, please help :)

13. Bizarre shell problem. NO WAY