# Trying to a Linux binary and getting ELF interpreter error 2



## larynx (Dec 21, 2016)

I'm running FreeBSD 11.0-RELEASE-p5 amd64, I installed the Linux Binary Compatibility according to the handbook (https://www.freebsd.org/doc/handbook/linuxemu-lbc-install.html) and I'm trying to run a Linux binary since a FreeBSD version doesn't exist and I'm getting the 
following message


```
ELF interpreter /lib64/ld-linux-x86-64.so.2 not found, error 2
```
I mounted linprocfs and tmpfs as stated after installing linux_base-c6, I searched around for a solution but couldn't find anything that works.

Any help would be appreciated, thanks


----------



## pkubaj (Dec 22, 2016)

The binary seems to be compiled for amd64. Do you use amd64-aware Linux compatibility layer?

If you installed from packages, AFAIK they are for i386 only.


----------



## larynx (Dec 22, 2016)

I went according to the handbook, it said to load the linux64 kernel module for 64-bit compatibility and I did by running `kldload linux64` and then install the emulators/linux_base-c6 package which I also did. The package has a comment that says 
	
	



```
Base set of packages needed in Linux mode for i386/amd64 (Linux CentOS 6)
```
 so it supposed to be 64-bit compatible but it still doesn't work.

Update: installed emulators/linux_base-c6 from ports, didn't work either


----------



## SirDice (Dec 22, 2016)

What does `sysctl kern.features.linux64` output?


----------



## larynx (Dec 22, 2016)

kern.features.linux64: 1


----------



## pkubaj (Dec 22, 2016)

Do:
`$ make -C /usr/ports/emulators/linux_base-c6 -V LINUX_DEFAULT`
If the result is 
	
	



```
c6
```
 put 
	
	



```
DEFAULT_VERSIONS=linux=c6_64
```
 into /etc/make.conf and reinstall Linux ports.
Alternatively, you can put 
	
	



```
DEFAULT_VERSIONS=linux=c7_64
```
 and use the newer CentOS 7 layer.


----------



## larynx (Dec 22, 2016)

Great, that worked.

I put DEFAULT_VERSIONS=linux=c6_64 in /etc/make.conf and reinstalled the emulators/linux_base-c6 port. Now I'm getting a different issue but at least the first part was solved

It's says:

```
XPCOMGlueLoad error for file libxul.so
libXrender.so.1: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
```

Going to search for solutions.


----------



## pkubaj (Dec 22, 2016)

larynx said:


> Great, that worked.
> 
> I put *DEFAULT_VERSIONS=linux=c6_64* in /etc/make.conf and reinstalled the *linux_base-c6* port. Now I'm getting a different issue but at least the first part was solved
> 
> ...


You need Linux version of libXrender.

Install x11/linux-c6-xorg-libs.


----------



## larynx (Dec 22, 2016)

pkubaj said:


> You need Linux version of libXrender.
> 
> Install x11/linux-c6-xorg-libs.



That worked but then I got an error about libexpat.so.1 so I installed the textproc/linux-c6-expat  port and now I'm getting a different issue


```
Sandbox: unexpected multithreading found; this prevent using namespace sanboxing.
1482442984900 addons.xpi-utils ERROR Unable to read anything useful from the database
```

Going to search for solutions, at least it's progress


----------

