# cannot run linux application on FreeBSD amd64



## fcaccava (Jan 30, 2012)

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:

```
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.


----------



## DutchDaemon (Jan 30, 2012)

fcaccava, you _really_ need to start formatting your posts now.


----------



## yks (Jan 30, 2012)

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.


----------



## adamk (Jan 31, 2012)

fcaccava said:
			
		

> 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


----------



## fcaccava (Jan 31, 2012)

```
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#
```


----------



## SirDice (Jan 31, 2012)

You can't run 64 bit linux executables, only 32 bit.


----------

