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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-29-2012, 02:28 AM
|
#1
|
LQ Newbie
Registered: Jun 2012
Posts: 5
Rep: 
|
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.
|
|
|
06-29-2012, 02:35 AM
|
#2
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,359
Rep: 
|
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
|
|
|
06-29-2012, 02:36 AM
|
#3
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417
|
can you please *prove* that the file is there? "ls -l" in that directory
|
|
|
06-29-2012, 02:39 AM
|
#4
|
LQ Newbie
Registered: Jun 2012
Posts: 5
Original Poster
Rep: 
|
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
|
|
|
06-29-2012, 02:54 AM
|
#5
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,359
Rep: 
|
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.
|
06-29-2012, 04:53 AM
|
#6
|
LQ Newbie
Registered: Jun 2012
Posts: 5
Original Poster
Rep: 
|
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.
|
|
|
06-30-2012, 01:11 AM
|
#7
|
Member
Registered: Feb 2009
Posts: 347
Rep:
|
How did you compile hello_arm ?
|
|
|
07-02-2012, 12:00 PM
|
#8
|
LQ Newbie
Registered: Jun 2012
Posts: 5
Original Poster
Rep: 
|
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.
|
|
|
All times are GMT -5. The time now is 05:45 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|