d9ab cannot run linux application on FreeBSD amd64 - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Ports & Packages > Installation and Maintenance of FreeBSD Ports or Packages

Installation and Maintenance of FreeBSD Ports or Packages Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

Reply
 
Thread Tools Display Modes
  #1  
Old January 30th, 2012, 20:25
fcaccava fcaccava is offline
Junior Member
 
Join Date: Jan 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default cannot run linux application on FreeBSD amd64

I have installed the linux_base-f10 port and it says support for 32 bit and amd64. However, when I try to run a linux application on my FreeBSD amd64 machine I get error:
Code:
eng55419# ./standalone
ELF binary type "3" not known.
./standalone: Exec format error. Binary file not executable.
eng55419# brandelf -l
known ELF types are: FreeBSD(9) Linux(3) Solaris(6) SVR4(0)
eng55419#
When I do a readelf -e on my executable, the OS/ABI is UNIX-Linux, so I believe the application has the correct branding.

Is it possible to run Linux applications on FreeBSD AMD64?

Thanks.

Last edited by DutchDaemon; January 31st, 2012 at 00:44. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old January 31st, 2012, 00:43
DutchDaemon's Avatar
DutchDaemon DutchDaemon is offline
Administrator
 
Join Date: Nov 2008
Location: Rotterdam, the Netherlands
Posts: 9,836
Thanks: 30
Thanked 1,888 Times in 1,333 Posts
Default

fcaccava, you really need to start formatting your posts now.
__________________
FreeBSD Forums: Information for New Members | FreeBSD Forums Rules
FreeBSD Resources: The FreeBSD Handbook | Manuals | FAQ | Wiki
Before you post: How to ask questions the smart way
If you must know .. So, what does an Adminstrator/Moderator do?
---> Do not PM me with FreeBSD questions. I do not work here. <---
Reply With Quote
  #3  
Old January 31st, 2012, 00:54
yks yks is offline
Junior Member
 
Join Date: Nov 2008
Location: spb.ru
Posts: 49
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Have you enabled linux emulation in the kernel? You need to load the linux.ko module
# kldload linux.ko
or compile it into your kernel. There is also an option linux_enable in rc.conf.
Reply With Quote
  #4  
Old January 31st, 2012, 02:31
adamk adamk is offline
Senior Member
 
Join Date: Nov 2008
Posts: 1,605
Thanks: 6
Thanked 262 Times in 243 Posts
Default

Quote:
Originally Posted by fcaccava View Post

Is it possible to run Linux applications on FreeBSD AMD64?

Thanks.
Yes, if the applications are 32-bit. The linux compat layer does not support 64-bit apps yet. What is the output of file ./standalone

Adam
Reply With Quote
  #5  
Old January 31st, 2012, 16:05
fcaccava fcaccava is offline
Junior Member
 
Join Date: Jan 2012
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Code:
eng55419# file ./standalone
./standalone: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped
eng55419#
Reply With Quote
  #6  
Old January 31st, 2012, 16:15
SirDice's Avatar
SirDice SirDice is online now
Moderator
 
Join Date: Nov 2008
Location: Rotterdam, Netherlands
Posts: 13,713
Thanks: 47
Thanked 2,022 Times in 1,861 Posts
Default

You can't run 64 bit linux executables, only 32 bit.
__________________
Senior UNIX Engineer at Unix Support Nederland
Experience is something you don't get until just after you need it.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot run .NET application using mono port fcaccava Installation and Maintenance of FreeBSD Ports or Packages 1 February 4th, 2013 23:31
[Solved] Linux application can't find ld-lsb.so.3 fonz General 2 July 7th, 2011 10:29
FreeBSD 82 amd64 + kde application xnl96 KDE 1 March 22nd, 2011 11:26
Architecture of Linux (FC8) in FreeBSD on amd64 rocky Installation and Maintenance of FreeBSD Ports or Packages 1 May 15th, 2009 12:31
[Solved] can i run GUI application without any dekstop enviroment alie General 8 December 22nd, 2008 11:04


All times are GMT +1. The time now is 21:21.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0