LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-25-2008, 08:38 AM   #1
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Rep: Reputation: 0
Strangely, bash tells me "no such file or directory", but it's there!?


Trying to run a program I was sent that was built from a 2.4 kernel.
My old Slackware says "no such file or directory", but 'ls -l' shows the file 'busmon*' is present and correct at 23243 bytes.
File permissions on busmon and the containing directory look okay to me.
Why should that happen and what steps will resolve the problem?
For the record 'uname -srm' => Linux 2.2.6 i686
Yes, I know that's a very old system but I've just reinstalled darkstar after a long break! Might even upgrade if I get the chance ;-)
 
Old 02-25-2008, 09:36 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591
Quote:
Originally Posted by ramchip View Post
My old Slackware says "no such file or directory"
Cool. But what's the actual command?


Quote:
Originally Posted by ramchip View Post
For the record 'uname -srm' => Linux 2.2.6 i686
Yes, I know that's a very old system but I've just reinstalled darkstar after a long break! Might even upgrade if I get the chance ;-)
"Very old" is a major understatement. I think upgrading jurassic-2.2 to 2.6-current leads to a lot of frustration. Frustration leads to anger, and we all know what anger leads to...
 
Old 02-25-2008, 10:04 AM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
Is this a shell program or a compiled program? If it is a shell, make sure the first line points to a shell that actually exists.

For example, if it says "#!/bin/sh" then "ls /bin/sh" should give a result. If not, find the proper shell on your system and change the line to match.

HTH

Forrest
 
Old 02-25-2008, 11:50 AM   #4
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the replies unSpawn and forrestt.

The compiled program is called busmon.
Hopefully, one day it will help me unravel a problem with a bus known as
IIC or I2C, spoken "eye-squared-see". It's a high-speed serial bus invented by Philips in the 1980s.

I'm expecting a production version of this program to arrive from afar in the near future. Whilst I was waiting I quickly reinstalled my *ancient* Slackeware version to see if I could make the pre-production offering do anything useful. Sadly, it failed to execute, hence the post. Unfortunately, I'm a little rusty with Linux but have been busy reading lots of documentation to refresh my memory.

Regards, ramchip
 
Old 02-25-2008, 11:53 AM   #5
eerok
Member
 
Registered: Nov 2005
Location: Canada
Distribution: Mint, Debian
Posts: 168

Rep: Reputation: 32
Quote:
Originally Posted by ramchip View Post
Trying to run a program I was sent that was built from a 2.4 kernel.
My old Slackware says "no such file or directory", but 'ls -l' shows the file 'busmon*' is present and correct at 23243 bytes.
Present where? Is it in your $PATH?
 
Old 02-25-2008, 12:05 PM   #6
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
As eerok is eluding to, if it isn't in your path, you will need to change your $PATH variable, call it with the full path to the file, or call it from the directory it is in with "./busmon".

HTH

Forrest
 
Old 02-25-2008, 01:18 PM   #7
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
I'm not sure how accurate the shell error messages are. Here's my tinkering:
# ./busmon
Result: bash: ./busmon: No such file or dir.
cp busmon /sbin
; because /sbin is first dir. on PATH
# busmon
Result: bash: /sbin/busmon: No such file or dir.
Tried a different shell.
# tcsh
# busmon
Result: busmon: Command not found.

If the shell messages are correct then I can list a program but not run it. Weird indeed!
Are there any tools I can use to quickly check if this program is a genuine executable?

Regards, ramchip
 
Old 02-25-2008, 01:28 PM   #8
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
What is the output of "file busmon"?

Let us know

Forrest
 
Old 02-25-2008, 02:16 PM   #9
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Thanks for the quick reply forrestt!

# file busmon
busmon: ELF 32-bit LSB executable i386 (386 and up) Version 1

Any chance this can be made to run on my ancient version of Slackware?
If not what would be a good strategy to get it going?

Regards, ramchip
 
Old 02-25-2008, 02:34 PM   #10
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, what is the result of "ls -la /sbin/busmon"

Let us know

Forrest
 
Old 02-25-2008, 07:04 PM   #11
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Okay Forrest

# ls -la /sbin/busmon

-rwxr-xr-x 1 root root 23243 Feb 25 18:52 /sbin/busmon*

ELF has been around since 1994 so why is my darkstar having such a problem
running this program?

P.S. unSpawn - Sorry about the duplication but my connection has been flakey today.
Didn't think the post worked because there was an error, so I repeated.

Regards, ramchip
 
Old 02-25-2008, 08:53 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591Reputation: 3591
Quote:
Originally Posted by ramchip View Post
Sorry about the duplication but my connection has been flakey today.
NP, that's been taken care of.

BTW, was the output from your 'file' command complete? It doesn't say static or dynamic (ldd), nor the version. This binary, you have the source code for? I mean you said it was built on a 2.4 kernel box? Compile it yourself?
 
Old 02-25-2008, 09:49 PM   #13
rupertwh
Member
 
Registered: Sep 2006
Location: Munich, Germany
Distribution: Debian / Ubuntu
Posts: 297

Rep: Reputation: 49
Maybe busmon does run after all, but then causes the error message itself?

The "Result: " at the beginning of the error msg seems strange to me, but maybe that's just a property of your distribution. But what does something like './agvfbvs' yield? (I.e. try to run something that really isn't there)

If that doesn't reveal anything, try 'strace busmon'.
 
Old 02-26-2008, 05:09 AM   #14
ramchip
LQ Newbie
 
Registered: Feb 2008
Location: UK
Distribution: Slackware
Posts: 17

Original Poster
Rep: Reputation: 0
Smile

Yes, non-existant programs give the same shell error message.
Even "# strace busmon" will generate it, preceeded by "strace: exec".

Online research last night revealed the following nugget of information.
Apparently, Slackware didn't switch to ELF until version 3.0 in September 1995.
That makes my trusty old version 2.2 look extremely dated!
The writing is on the wall - I need to upgade to get busmon to work.
I know upgrading can be a minefield but presumably I could try for version 12 and eventually all will be hunky dory.
Thanks to everybody who helped me arrive at this conclusion!
This is my first experience of LQ, and a good one :-)

Kind regards, ramchip
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Bash scripting: "line [...]: [directory]: is a directory " ? serious Linux - Newbie 1 10-20-2007 12:08 PM
LFS 6.2 Ch. 6.14 - 2nd Coreutils test returns "/bin.bash: No such file or directory" 0graham0 Linux From Scratch 2 08-23-2007 06:32 PM
How to write a bash script to replace all "KH" to "K" in file ABC??? cqmyg5 Slackware 4 07-24-2007 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration