10807 ELF binary type "0" not known. - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > General

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

Reply
 
Thread Tools Display Modes
  #1  
Old June 25th, 2011, 17:12
frankgrimes97 frankgrimes97 is offline
Junior Member
 
Join Date: Jun 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default ELF binary type "0" not known.

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:
ELF binary type "0" not known.
./run: Exec format error. Binary file not executable.
I did some searching online and even tried the following:

brandelf -t Linux run

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 kldstat:
Code:
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 linux_base-f10 port installed (tried also with linux_base-fc6 with the same results).

Any help would be much appreciated.

Thanks,

Frank Grimes

Last edited by DutchDaemon; June 25th, 2011 at 21:55. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #2  
Old June 25th, 2011, 19:23
kpedersen kpedersen is offline
Member
 
Join Date: Apr 2009
Posts: 680
Thanks: 9
Thanked 102 Times in 74 Posts
Default

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.

Last edited by DutchDaemon; June 25th, 2011 at 21:56.
Reply With Quote
  #3  
Old June 25th, 2011, 21:09
matoatlantis's Avatar
matoatlantis matoatlantis is offline
Member
 
Join Date: Mar 2009
Location: bratislava, slovakia
Posts: 402
Thanks: 23
Thanked 58 Times in 49 Posts
Default

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:

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

Update libs:

# /usr/compat/linux/sbin/ldconfig

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

# brandelf -t linux /path/to/binary
__________________
..when you do things right, people won't be sure you've done anything at all..
Reply With Quote
  #4  
Old June 26th, 2011, 04:37
frankgrimes97 frankgrimes97 is offline
Junior Member
 
Join Date: Jun 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

As I mentioned, I did try running brandelf -t Linux 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

Last edited by DutchDaemon; June 26th, 2011 at 19:25.
Reply With Quote
  #5  
Old June 27th, 2011, 05:25
frankgrimes97 frankgrimes97 is offline
Junior Member
 
Join Date: Jun 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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 brandelf -t Linuxon it.

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

Thanks,

Frank Grimes

Last edited by DutchDaemon; June 27th, 2011 at 13:00. Reason: Proper formatting: http://forums.freebsd.org/showthread.php?t=8816
Reply With Quote
  #6  
Old June 27th, 2011, 05:35
wblock@'s Avatar
wblock@ wblock@ is offline
Moderator
 
Join Date: Sep 2009
Location: Milky Way galaxy
Posts: 7,725
Thanks: 432
Thanked 1,762 Times in 1,459 Posts
Default

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

Otherwise, watching what ftp/linux-f10-curl does during install might be helpful.
Reply With Quote
  #7  
Old June 27th, 2011, 09:23
vertexSymphony's Avatar
vertexSymphony vertexSymphony is offline
Junior Member
 
Join Date: May 2010
Location: Buenos Aires, Argentina
Posts: 78
Thanks: 166
Thanked 12 Times in 8 Posts
Default

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

Cheers

Last edited by DutchDaemon; June 27th, 2011 at 13:04.
Reply With Quote
The Following User Says Thank You to vertexSymphony For This Useful Post:
frankgrimes97 (June 27th, 2011)
  #8  
Old June 27th, 2011, 17:47
frankgrimes97 frankgrimes97 is offline
Junior Member
 
Join Date: Jun 2011
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by vertexSymphony View Post
Clean the entire Linux enviroment, reinstall Linux base, and try downloading the 32 bit version of the binary you're interested in. The linux(4) 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
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
[Solved] /libexec/ld-elf.so.1: Shared object "libssl.so.7" not found ccc Installation and Maintenance of FreeBSD Ports or Packages 18 April 24th, 2012 08:49
[Solved] /libexec/ld-elf.so.1: Shared object "libjpeg.so.9" not found SeaHag Installation and Maintenance of FreeBSD Ports or Packages 41 July 15th, 2011 21:28
ccache breaks buildworld at "i386-elf" - use CCACHE_CPP2 Beeblebrox Installing & Upgrading 0 June 7th, 2011 08:19
/libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required by "pg_config" LocalEtc Installation and Maintenance of FreeBSD Ports or Packages 7 February 9th, 2011 18:30
[Solved] "dereferencing pointer to incomplete type" error in examplar code - linuxism? caesius Userland Programming & Scripting 3 November 26th, 2009 20:06


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


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