LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-24-2008, 10:47 AM   #1
ProcalX
LQ Newbie
 
Registered: Jul 2008
Location: UK
Distribution: FreeBSD 6.3
Posts: 4

Rep: Reputation: 0
ELF interpreter ld-linux.so.2 not found


I run FreeBSD 6 on a Intel QuadCore dedicated server, logged in as root I am trying to install a piece of game server software using: ./cod4_lnxded

However I recieve this error:
PHP Code:
ELF interpreter /lib/ld-linux.so.2 not found
Abort trap 
From doing a few google searches this suggests that I am missing some libraries and that I need to install a linux emulator port?

How do I do this please?

Thank You
 
Old 07-24-2008, 11:04 AM   #2
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
Quote:
Originally Posted by ProcalX View Post
I run FreeBSD 6 on a Intel QuadCore dedicated server, logged in as root I am trying to install a piece of game server software using: ./cod4_lnxded

However I recieve this error:
PHP Code:
ELF interpreter /lib/ld-linux.so.2 not found
Abort trap 
From doing a few google searches this suggests that I am missing some libraries and that I need to install a linux emulator port?

How do I do this please?

Thank You
Try this:

Code:
# kldload linux
# kldstat
(Should output something like this):
Id Refs Address    Size     Name
 1    2 0xc0100000 16bdb8   kernel
 7    1 0xc24db000 d000     linux.ko
If that works fine, you can then install the libraries via ports like such:

Code:
# cd /usr/ports/emulators/linux_base-fc4
# make install distclean
If you don't have ports installed, then you can add the libs manually (A much bigger headache, imho).

If you've got all of that going and it's still not working, then try this:

Code:
# ldd cod4_lnxded
That'll produce output similar to this:

Code:
libXt.so.3 (DLL Jump 3.1) => /usr/X11/lib/libXt.so.3.1.0
libX11.so.3 (DLL Jump 3.1) => /usr/X11/lib/libX11.so.3.1.0
libc.so.4 (DLL Jump 4.5pl26) => /lib/libc.so.4.6.29
You'll need to hunt down those files and ensure they're in /compat/linux and that you've got symlinks in place to point from what the binary you're trying to run is looking for (the first column) to the last column (that I highlighted). In the end for this example, you'd have something like this:

Code:
/compat/linux/usr/X11/lib/libXt.so.3.1.0
/compat/linux/usr/X11/lib/libXt.so.3 -> libXt.so.3.1.0
/compat/linux/usr/X11/lib/libX11.so.3.1.0
/compat/linux/usr/X11/lib/libX11.so.3 -> libX11.so.3.1.0
/compat/linux/lib/libc.so.4.6.29
/compat/linux/lib/libc.so.4 -> libc.so.4.6.29
Let me know if that info helps.

Edit - I found all of this info here: http://www.freebsd.org/doc/en_US.ISO...c-install.html

There's quite a bit more info there that may be of assistance.

Last edited by rocket357; 07-24-2008 at 11:08 AM.
 
Old 07-24-2008, 11:21 AM   #3
ProcalX
LQ Newbie
 
Registered: Jul 2008
Location: UK
Distribution: FreeBSD 6.3
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you for you response, when I type in: kldload linux I recieve this message:

PHP Code:
kldloadcan't load linux: Operation not permitted 
When I type: kldstat I get this message:

PHP Code:
ID REFS Address            Size    Name
1   2   0xffffffff80100000 a47150  kernel
2   1   0xffffffff80b48000 1408    accf_http
.ko 
When I try: ldd cod4_lnxded I get this:
PHP Code:
lddcod4_lnxdedcan't read program header
ldd: cod4_lnxded: not a dynamic executable 
With reference to the article on the freebsd.org site you linked to it states:
Quote:
You will need the Linux shared libraries that the program depends on and the runtime linker
How do I know what the "program depends on" and what the correct runtime linker is?

Last edited by ProcalX; 07-24-2008 at 11:23 AM.
 
Old 07-24-2008, 11:54 AM   #4
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 187

Rep: Reputation: 74
Quote:
Originally Posted by ProcalX View Post
Thank you for you response, when I type in: kldload linux I recieve this message:

PHP Code:
kldloadcan't load linux: Operation not permitted 
You got this error as root, or as your normal user? You should su or sudo to root to run that.

Quote:
Originally Posted by ProcalX View Post
How do I know what the "program depends on" and what the correct runtime linker is?
This info you can get with the ldd command, but you need to have the linux.ko module loaded.
 
Old 07-24-2008, 12:16 PM   #5
ProcalX
LQ Newbie
 
Registered: Jul 2008
Location: UK
Distribution: FreeBSD 6.3
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rocket357 View Post
You got this error as root, or as your normal user? You should su or sudo to root to run that.



This info you can get with the ldd command, but you need to have the linux.ko module loaded.
I got this error as root.

how do i load the linux.ko module?
 
Old 07-24-2008, 12:45 PM   #6
ProcalX
LQ Newbie
 
Registered: Jul 2008
Location: UK
Distribution: FreeBSD 6.3
Posts: 4

Original Poster
Rep: Reputation: 0
With some help from a kind soul on IRC i've got linux module etc sorted:

However when I run: ldd cod4_lnxded I get given this:
PHP Code:
lddcod4_lnxdedcan't read program header
ldd: cod4_lnxded: not a dynamic executable 
when I do: /usr/compat/linux/usr/bin/ldd cod4_lnxded it just goes straight to a new line no output.

Last edited by ProcalX; 07-24-2008 at 02:22 PM.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bad ELF interpreter dfw123 Linux - Newbie 2 05-07-2007 07:04 PM
Error:bad ELF interpreter : No such file or directory vicky_me Red Hat 1 03-21-2007 05:29 AM
Help! ELF Interpreter problem emperor_black *BSD 4 12-22-2006 05:05 PM
bad ELF interpreter kirtimaan_bkn Linux - Newbie 13 07-04-2006 11:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration