LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2012, 02:28 AM   #1
dungnguyen
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Rep: Reputation: Disabled
Can't run an executable file


Hi all,

I use qemu-system-arm to run an bootable image, but there are something wrong but I don't know how to fix it.
I have a file called hello_arm in dir /home. It's an executable file. I want to run it in terminal. Here is what I do:

root@linaro:/home# ./hello_arm

but there is an error here

-bash: ./hello_arm: No such file or directory

I'm sure that hello_arm is there. How can I fix this error?
This is my fist post in LQ and sorry about my bad English skill.
 
Old 06-29-2012, 02:35 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,359

Rep: Reputation: Disabled
Hi, welcome to LQ.

Maybe hello_arm is an executable for an other architecture than your machine's architecture (e.g. 64 bit vs 32 bit).

To make sure please post output of following commands:
Code:
uname -a
file /home/hello_arm
ls -l /home/hello_arm
 
Old 06-29-2012, 02:36 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
can you please *prove* that the file is there? "ls -l" in that directory
 
Old 06-29-2012, 02:39 AM   #4
dungnguyen
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thanks for your respond.

Here is some line in my terminal:

root@linaro:/home# ls -l
total 8
-rwxr-xr-x 1 root root 7569 Jun 28 12:39 hello_arm


root@linaro:/home# uname -a
Linux linaro 2.6.38-1003-linaro-omap #4~ppa5-Ubuntu SMP PREEMPT Wed May 25 14:44:32 UTC 2011 armv7l armv7l armv7l GNU/Linux

root@linaro:/home# file hello_arm
hello_arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
 
Old 06-29-2012, 02:54 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,359

Rep: Reputation: Disabled
I don't know ARM architecture but I would check that hello_arm was compiled for the same ARM version which run on your computer, maybe look at this page.
 
1 members found this post helpful.
Old 06-29-2012, 04:53 AM   #6
dungnguyen
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank Didier Spaier,
You said that "Maybe hello_arm is an executable for an other architecture than your machine's architecture (e.g. 64 bit vs 32 bit)", so I check another file in my /bin such as /bin/bash. Then, I have:
Code:
root@linaro:~# file /bin/bash
/bin/bash: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped
It's quite similar with what I have with hello_arm
Code:
root@linaro:/home# file hello_arm 
hello_arm: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), not stripped
I wonder these are another reasons for this error?

Once again, thank you for your respond.
 
Old 06-30-2012, 01:11 AM   #7
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
How did you compile hello_arm ?
 
Old 07-02-2012, 12:00 PM   #8
dungnguyen
LQ Newbie
 
Registered: Jun 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Smile

I have solved my problem. This problem came when I compile file hello_arm.
I use crosstool-ng to build my cross-compiler and it wrong (I don't know why because the result I have is same with tutorial). Then, I use a pre-build crosstool and it run fine.
Thank you all.
 
  


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
Make a file executable and then run mostafaashish Linux - Newbie 7 02-20-2014 05:34 AM
running thunderbird 10 executable file without to press the run prompt archimede2 Linux - Newbie 9 02-28-2012 12:00 AM
Cannot run C++ executable file from Ubuntu 10.10 GUI LaserGuided Linux - Newbie 10 04-18-2011 11:55 AM
[SOLVED] Using variable to run an executable file mahmoodn Linux - General 3 05-27-2010 06:17 AM
can't run the executable file after compiling with g++ compiler moondog1129 Linux - Laptop and Netbook 2 02-06-2006 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05: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
Open Source Consulting | Domain Registration