LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-08-2011, 11:12 AM   #1
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Rep: Reputation: Disabled
Unhappy i have a problem cannot execute binary file


+ ./bfr -m 0 -i 1k -b 50m .session/353870801d09d71007f5f0b774e4a9cbf5152c37
./scan: line 35: ./bfr: cannot execute binary file


I make a program for my school project in linux:

CentOS release 5.3 (Final)
Kernel \r on an \m

and i get that error first time has worked but now it didn't!!
 
Old 07-08-2011, 11:17 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hello,

Follow your output; In the scan file, on line 35, what is it trying to do? Also, check your permissions on both files, and make sure that they are chmod'd for +x.

Cheers,

Josh
 
Old 07-08-2011, 11:23 AM   #3
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
./bfr -m 0 -i 1k -b 50m $SESSION | while read LINE; do
Line 35!



[root@clw1 school proj]# ./bfr
bash: ./bfr: cannot execute binary file

Last edited by AngryBeast; 07-08-2011 at 11:24 AM.
 
Old 07-08-2011, 11:31 AM   #4
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Like I have said before, have you checked the permissions? Navigate to the directory where bfr is located, and enter the following:
Code:
ls -al
This will show you the permissions the file has, and it needs to have the execute permission in order to run it. To make sure of this, enter the following:
Code:
chmod +x bfr
Also, you might have to run it as root, depending on the permissions and the ownership of the file.

Cheers,

Josh
 
Old 07-08-2011, 11:33 AM   #5
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
[root@clw1 school proj]# chmod +x bfr
[root@clw1 school proj]# ./bfr
-bash: ./bfr: cannot execute binary file
[root@clw1 school proj]#
 
Old 07-08-2011, 11:35 AM   #6
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Hmm.... Can you post the bfr file for us?
 
Old 07-08-2011, 11:38 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@AngryBeast: Are you sure bfr was compiled correctly?
 
Old 07-08-2011, 11:40 AM   #8
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
yup i have 2 systems ubuntu and linux on ubuntu works fine !!!! but i need it to work on linux!!! wait i try to look for bfr source because i have it only compiled !!!!
 
Old 07-08-2011, 11:50 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
@AngryBeast: Another thing, what is the output of
Code:
file bfr
 
Old 07-08-2011, 11:50 AM   #10
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
i found bfr.c but is very big !!!! bfr is not my own creation i found it on internet ! is a free software who helps me :/ the Main author: Mark Glines <mark@glines.org> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=217530

---------- Post added 07-08-11 at 11:51 AM ----------

http://bfr.sourcearchive.com/documen...8c-source.html here is the source




[root@clw1 school proj]# file bfr
bfr: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
[root@clw1 school proj]#

Last edited by AngryBeast; 07-08-2011 at 11:53 AM.
 
Old 07-08-2011, 11:54 AM   #11
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Could it be you are using a 64 bit version on a 32 bit system?

Kind regards
 
Old 07-08-2011, 12:03 PM   #12
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
[root@clw1 school proj]# uname -m
i686
[root@clw1 school proj]#
 
Old 07-08-2011, 12:12 PM   #13
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Guess you now know why it doesn't work

i686 = 32 bit and x86_64 = 64 bit
 
Old 07-08-2011, 12:16 PM   #14
AngryBeast
Member
 
Registered: Jul 2011
Posts: 59

Original Poster
Rep: Reputation: Disabled
OMG!!!!! HOW NOOOB I AM !!!!! is there any posibility to upgrade to x64 ? or i need to reinstall a fresh x64?
 
Old 07-08-2011, 12:36 PM   #15
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
You could always recompile for your system
 
  


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
cannot execute binary file tamilselvan.forum Linux - Newbie 12 10-14-2009 07:15 PM
None of the compliers working, a "can not execute binary file" problem jason_zhang Linux - Newbie 3 10-26-2008 12:29 PM
PROBLEM- cannot execute binary file FCB Linux - Newbie 12 07-31-2007 10:08 AM
Can't execute a binary file inverted.gravity Linux - General 4 08-07-2006 10:08 PM
Problem running execute binary file zekko Linux - General 18 08-08-2003 06:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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