cannot run linux application on FreeBSD amd64

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

cannot run linux application on FreeBSD amd64

Postby fcaccava » 30 Jan 2012, 19:25

I have installed the [FILE]linux_base-f10[/FILE] 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: Select all
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 [FILE]readelf -e[/FILE] 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.
fcaccava
Junior Member
 
Posts: 9
Joined: 26 Jan 2012, 14:57

Postby DutchDaemon » 30 Jan 2012, 23:43

fcaccava, you really need to start formatting your posts now.
User avatar
DutchDaemon
Old Fart
 
Posts: 10463
Joined: 16 Nov 2008, 20:17
Location: The Netherlands

Postby yks » 30 Jan 2012, 23:54

Have you enabled linux emulation in the kernel? You need to load the [FILE]linux.ko[/FILE] module
[CMD="#"]kldload linux.ko[/CMD]
or compile it into your kernel. There is also an option [FILE]linux_enable[/FILE] in [FILE]rc.conf[/FILE].
yks
Junior Member
 
Posts: 49
Joined: 17 Nov 2008, 08:10
Location: spb.ru

Postby adamk » 31 Jan 2012, 01:31

fcaccava wrote:
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 [cmd=""]file ./standalone[/cmd]

Adam
adamk
Senior Member
 
Posts: 1624
Joined: 21 Nov 2008, 11:00

Postby fcaccava » 31 Jan 2012, 15:05

Code: Select all
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#
fcaccava
Junior Member
 
Posts: 9
Joined: 26 Jan 2012, 14:57

Postby SirDice » 31 Jan 2012, 15:15

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.
User avatar
SirDice
Old Fart
 
Posts: 16153
Joined: 17 Nov 2008, 16:50
Location: Rotterdam, Netherlands


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 0 guests