ELF binary type "0" not known.

General questions about the FreeBSD operating system. Ask here if your question does not fit elsewhere.

ELF binary type "0" not known.

Postby frankgrimes97 » 25 Jun 2011, 16:12

Hi all,

I am trying to install a product that ships as RedHat Enterprise Linux 5 certified RPMs. After successfully installing the RPMs and trying to launch binaries, I get the following error:

Code: Select all
ELF binary type "0" not known.
./run: Exec format error. Binary file not executable.


I did some searching online and even tried the following:

[cmd=]brandelf -t Linux run[/cmd]

But then it just complains that type "3" is not known either.

I'm running FreeBSD 8.2-RELEASE and I believe that Linux compatibility is correctly enabled as evidenced by the output of [FILE]kldstat[/FILE]:
Code: Select all
Id Refs Address            Size     Name
 1   20 0xffffffff80100000 c9fe20   kernel
 2    1 0xffffffff80da0000 202a58   zfs.ko
 3    2 0xffffffff80fa3000 4940     opensolaris.ko
 4    2 0xffffffff81022000 1cecd    linux.ko
 5    1 0xffffffff8103f000 3edb     linprocfs.ko


I also have the [FILE]linux_base-f10[/FILE] port installed (tried also with [FILE]linux_base-fc6[/FILE] with the same results).

Any help would be much appreciated.

Thanks,

Frank Grimes
frankgrimes97
Junior Member
 
Posts: 4
Joined: 25 Jun 2011, 16:00

Postby kpedersen » 25 Jun 2011, 18:23

I remember reading in the handbook that you need to rebrand the elf binary.

I don't use Linux compatibility so perhaps someone else could explain this some more.
kpedersen
Member
 
Posts: 822
Joined: 18 Apr 2009, 22:46

Postby matoatlantis » 25 Jun 2011, 20:09

It is some time I've used linux-compat mode. I did make myself some notes so I know how to proceed if I need it in a future. Maybe this helps:

Install rpm:

[CMD="#"]rpm --ignoreos --root /usr/compat/linux --dbpath /var/lib/rpm --nodeps --replacepkgs --install <PKG>.RPM[/CMD]

Update libs:

[CMD="#"]/usr/compat/linux/sbin/ldconfig[/CMD]

Mark the binary for the correct ABI with brandelf(1):

[CMD="#"]brandelf -t linux /path/to/binary[/CMD]
[color="Gray"]..when you do things right, people won't be sure you've done anything at all..[/color]
User avatar
matoatlantis
Member
 
Posts: 510
Joined: 26 Mar 2009, 21:07
Location: bratislava, slovakia

Postby frankgrimes97 » 26 Jun 2011, 03:37

As I mentioned, I did try running [FILE]brandelf -t Linux[/FILE] but it then simply complains that ELF binary type "3" is not known. Is there something I can check that I might have missed in setting up Linux compatibility?

Thanks,

Frank Grimes
frankgrimes97
Junior Member
 
Posts: 4
Joined: 25 Jun 2011, 16:00

Postby frankgrimes97 » 27 Jun 2011, 04:25

As a simpler test I tried installing a RedHat rpm of Curl (curl-7.15.5-9.el5.x86_64.rpm) and I still get ELF binary type "3" is not known after running [FILE]brandelf -t Linux[/FILE]on it.

Can someone else try this on FreeBSD 8.2 with [FILE]linux_base-f10[/FILE] and let me know if it works? Maybe then we can more easily track down what's missing in my configuration.

Thanks,

Frank Grimes
frankgrimes97
Junior Member
 
Posts: 4
Joined: 25 Jun 2011, 16:00

Postby wblock@ » 27 Jun 2011, 04:35

Do you have Linux compatibility fully set up, including [file]linproc[/file] in [file]/etc/fstab[/file]?

Otherwise, watching what [port]ftp/linux-f10-curl[/port] does during install might be helpful.
User avatar
wblock@
Old Fart
 
Posts: 10155
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby vertexSymphony » 27 Jun 2011, 08:23

Clean the entire Linux enviroment, reinstall Linux base, and try downloading the 32 bit version of the binary you're interested in. The [man=4]linux[/man] compat layer emulates a (partial) 32 bit Linux system ABI and you're installing a 64 bit package (x86_64)

Cheers
User avatar
vertexSymphony
Junior Member
 
Posts: 78
Joined: 23 May 2010, 22:12
Location: Buenos Aires, Argentina

Postby frankgrimes97 » 27 Jun 2011, 16:47

vertexSymphony wrote:Clean the entire Linux enviroment, reinstall Linux base, and try downloading the 32 bit version of the binary you're interested in. The [man=4]linux[/man] compat layer emulates a (partial) 32 bit Linux system ABI and you're installing a 64 bit package (x86_64)

Cheers


I don't know how I missed the fact that Linux compatibility is only 32-bit... I really need 64-bit so I guess I'm out of luck here.
Thanks for taking the time to clarify!

Frank Grimes
frankgrimes97
Junior Member
 
Posts: 4
Joined: 25 Jun 2011, 16:00


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests