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 |
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.
|
|
|
09-25-2014, 10:11 PM
|
#1
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Rep:
|
embedded linux scp over application won't run
Hello,
I have a TI AM3352 processor running embedded linux (angstrom 3.2.0).
I connect over SSH to the device.
I scp my application - I created (a hello world) into /home/root.
I changed the permissions on the file to executable.
When I try to run the application over SSH via ./HelloWorld
I get an error:
-sh: ./HelloWorld: not found
Not sure why I cannot run the application???
Any help would be greatly appreciated.
Last edited by brentw; 09-26-2014 at 07:29 AM.
|
|
|
09-26-2014, 09:25 AM
|
#2
|
Moderator
Registered: Aug 2002
Posts: 26,477
|
linux is case sensitive. Have you typed in the correct name?
Have you verified that you are in the same directory as the executable?
Do you see it when you use the ls command?
|
|
|
09-26-2014, 09:33 AM
|
#3
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
Thanks for the reply.
I have also used Putty to SSH in. I cd to the directory /home/root. I can do a ls -all and see that the file is there and that permission have been changed.
When I type in ./HelloWorld it auto completes so I am using the correct name.
|
|
|
09-26-2014, 10:08 AM
|
#4
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
This is probably a dumb question, but I take it I should be able to launch my application over SSH?
|
|
|
09-26-2014, 10:14 AM
|
#5
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
^ yes. not that we dont beleive you but can you please show us the contents of ls -al. also can you please show us the contents of you hello-world.c file (maybe your printf() is commented out or something ?).
|
|
|
09-26-2014, 10:51 AM
|
#6
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
No problem, being a newbie, I am sure I am making a lot of dumb mistakes. The ls -all command shows my app, but if I type -l ./HelloWorld it does not exist??
I don't understand? Did the SCP not work?
root@(none):~# -l ./HelloWorld
-sh: -l: not found
root@(none):~# pwd
/home/root
root@(none):~# ls -all
drwxr-xr-x 4 1000 pulse 4096 Jan 1 2000 .
drwxr-xr-x 4 1000 pulse 4096 Aug 27 2014 ..
-rwxrwxrwx 1 root root 4096 Sep 26 2014 HelloWorld
#include <stdio.h>
main()
{
printf("Hello, world!\n");
return 0;
}
|
|
|
09-26-2014, 11:05 AM
|
#7
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
it should be ./HelloWorld to run your program.
some more diagnostics:
Code:
uname -a -m -p
file HelloWorld
|
|
|
09-26-2014, 11:30 AM
|
#8
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
uname -a -m -p filename HelloWorld
BusyBox v1.20.2 (2014-08-29 11:12:39 CDT) multi-call binary.
Usage: uname [-amnrspv]
Print system information
-a Print all
-m The machine (hardware_ type
-n Hostname
-r OS release
-s OS name (default)
-p Processor type
-v OS version
|
|
|
09-26-2014, 11:35 AM
|
#9
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
^ please type in followed by the enter key.
then type in followed by enter then copy-pasta the output in your next response.
|
|
|
09-26-2014, 11:44 AM
|
#10
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
uname -a -m -p
Linux (none) 3.2.0 #5 Wed Sept 10 18:06:00 CDT 2014 armv71 GNU/Linux
root@ (none):~# file HelloWorld
-sh: file: not found
|
|
|
09-26-2014, 12:38 PM
|
#11
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
i find it too coincidental that the HelloWorld program is exactly 4096 bytes big... are you sure its not a directory ?
|
|
|
09-26-2014, 12:43 PM
|
#12
|
Senior Member
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278
|
Dude.. you added an -l before the Helloworld program.. -l is not a program.
Perhaps you meant to type 'ls'
Anyway,. what is IN HelloWorld? Is it a C program like the code above? if it is, you have to compile it first. You can't just "run" un-compiled code.
|
|
|
09-26-2014, 12:50 PM
|
#13
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
Is my SCP not working?
Could it be the permissions on the file system? If so how do I change them?
|
|
|
09-26-2014, 12:53 PM
|
#14
|
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326
|
what happens when you do: .
how did you compile it... maybe you compiled it for x86 so therefore it wont run on arm (but i would expect a different error than file not found) ?
|
|
|
09-26-2014, 01:03 PM
|
#15
|
LQ Newbie
Registered: Aug 2014
Posts: 29
Original Poster
Rep:
|
I have the following defined in my .bashrc file
ARCH=arm
CROSS_COMPILE=arm-linux-gnueabi-
PATH variable to the cross compiler
then I have a very simple make file that uses the cross compiler
|
|
|
All times are GMT -5. The time now is 10:09 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
|
|