LinuxQuestions.org
Visit Jeremy's Blog.
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 09-25-2014, 10:11 PM   #1
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Rep: Reputation: Disabled
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.
 
Old 09-26-2014, 09:25 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,477

Rep: Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218
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?
 
Old 09-26-2014, 09:33 AM   #3
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-26-2014, 10:08 AM   #4
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
This is probably a dumb question, but I take it I should be able to launch my application over SSH?
 
Old 09-26-2014, 10:14 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
^ 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 ?).
 
Old 09-26-2014, 10:51 AM   #6
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
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;
}
 
Old 09-26-2014, 11:05 AM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
it should be ./HelloWorld to run your program.

some more diagnostics:
Code:
uname -a -m -p
file HelloWorld
 
Old 09-26-2014, 11:30 AM   #8
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-26-2014, 11:35 AM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
^ please type in
Code:
uname -a -m -p
followed by the enter key.
then type in
Code:
file HelloWorld
followed by enter then copy-pasta the output in your next response.
 
Old 09-26-2014, 11:44 AM   #10
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
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
 
Old 09-26-2014, 12:38 PM   #11
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
i find it too coincidental that the HelloWorld program is exactly 4096 bytes big... are you sure its not a directory ?
 
Old 09-26-2014, 12:43 PM   #12
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
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.
 
Old 09-26-2014, 12:50 PM   #13
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
Is my SCP not working?

Could it be the permissions on the file system? If so how do I change them?
 
Old 09-26-2014, 12:53 PM   #14
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
what happens when you do:
Code:
cat HelloWorld
.
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) ?
 
Old 09-26-2014, 01:03 PM   #15
brentw
LQ Newbie
 
Registered: Aug 2014
Posts: 29

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply

Tags
embedded, linux, scp, ssh


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
gpk-application - won't run as root, useless as user??? ench0 Fedora 1 06-07-2011 08:19 AM
Java application for Embedded Linux with Eclipse as the IDE tiannho Linux - Embedded & Single-board computer 8 06-02-2010 03:49 PM
Embedded Linux application with Flash GUI? _ian_ Linux - Mobile 6 04-21-2009 08:09 AM
linux embedded application jfsebastian Linux - General 4 10-24-2006 01:21 PM

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

All times are GMT -5. The time now is 10:09 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