LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-13-2015, 09:37 AM   #1
kathbeau
Member
 
Registered: Nov 2014
Posts: 31

Rep: Reputation: Disabled
Copied my app from one Linux to a second on VM: bash cannot exec binary file


First, I am a Linux newbie (only a few months of experience).

My development machine is a 64-bit running Debian 7

Code:
on 64-bit dev machine
uname -a
Linux mix 3.16-0.bpo.2-amd64 #1 SMP Debian 3.16.3-2~bpo70+1 (2014-09-21) x86_64 GNU/Linux
I have a wxWidgets app that I copied to a Kali Linux environment running in 32-bit VMware Player on my Windows 7-64 machine.

Code:
on 32-bit VM machine
uname -a
Linux kali 3.12-kalil-486 #1 Debian 3.12.6-2kalil (2014-01-06) i686 GNU/Linux
I build the app using Code::Blocks, which as far as I know can build only 32-bit apps.

When I copy my app from dev to VM, however, and try to run it, I get this error:

Code:
bash: ./MyApp: cannot execute binary file
I have performed searches for this error message, but have not found one that seems to address my situation.

I'm hoping this will sound like a "newbie" question, and that somebody can steer me towards a solution.

Thanks for your help,
Kathleen
 
Old 03-13-2015, 09:50 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Binary compiled to run under 64bit cpu cannot run on a 32bit cpu. Vice Versa may be possible but depends.

You can check which arch a binary is by running:
Code:
file binary-name
 
Old 03-13-2015, 10:04 AM   #3
kathbeau
Member
 
Registered: Nov 2014
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by veerain View Post
Binary compiled to run under 64bit cpu cannot run on a 32bit cpu. Vice Versa may be possible but depends.

You can check which arch a binary is by running:
Code:
file binary-name
Thank you! The file command reveals that it is, indeed, a 64-bit app.

I'll take this up in the Code::Blocks forum to find out how I can build a 32-bit app on my 64-bit dev machine.

Kathleen
 
  


Reply



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
Linux utility to combine two or more binary files into a single binary file mageshvan Programming 7 05-05-2011 08:06 AM
Exec format error. Binary file not executable. Fetch Bug? Dimitriy *BSD 2 04-21-2010 04:34 PM
Bash File Name Matching - Binary file .ogg matches !!! maxvonseibold Linux - General 8 01-30-2007 06:31 PM
Exec format error. binary file not executable. kaz2100 Linux - General 2 08-19-2006 05:26 PM
FC5-test1-binary-i386-exec of anaconda failed: no such file or directory, any ideas? frankj Fedora 1 01-02-2006 12:30 AM

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

All times are GMT -5. The time now is 02:43 PM.

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