LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-26-2014, 01:28 PM   #1
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Rep: Reputation: 0
What is this error cannot find -lelf


I am trying to compile aide. The commands are ./configure,make, make install.

I get two errors on the make command and never make it to the make install command.

Code:
gcc -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS -W -Wall -g -g -O2   -static  -o aide aide.o base64.o be.o commandconf.o compare_db.o conf_lex.o conf_yacc.o db.o db_disk.o db_file.o db_lex.o db_list.o db_sql.o do_md.o error.o gen_list.o getopt1.o getopt.o gnu_regex.o list.o md.o snprintf.o symboltable.o util.o  -lm       -lelf 
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[3]: *** [aide] Error 1
make[3]: Leaving directory `/home/james/Desktop/aide-0.15.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/james/Desktop/aide-0.15.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/james/Desktop/aide-0.15.1'
make: *** [all] Error 2
The firt error is the one that I am concerned about. I beleive the second error will do way once I take care of the first error.


The error is

Code:
cc -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS -W -Wall -g -g -O2   -static  -o aide aide.o base64.o be.o commandconf.o compare_db.o conf_lex.o conf_yacc.o db.o db_disk.o db_file.o db_lex.o db_list.o db_sql.o do_md.o error.o gen_list.o getopt1.o getopt.o gnu_regex.o list.o md.o snprintf.o symboltable.o util.o  -lm       -lelf 
/usr/bin/ld: cannot find -lelf
collect2: ld returned 1 exit status
make[3]: *** [aide] Error 1

It is not finding -lelf.

ld returned 1 exit status


I am not sure how to make it find lelf.

Any help appreciated.


Thanks in advance.


R,


jyunker
 
Old 03-26-2014, 01:45 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
I think you have a tab instead of a space in your command line right before calling out the library elf
 
Old 03-26-2014, 02:04 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
"lelf" = libelf.so

* How to decide a package providing libelf.so : $ yum provides */libelf.so
Install the package : # yum install elfutils-libelf-devel

Installing `aide-0.14.3' : # yum install aide

-
 
Old 03-26-2014, 02:16 PM   #4
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Original Poster
Rep: Reputation: 0
explain please

I am not sure what you are saying:


Code:
I think you have a tab instead of a space in your command line right before calling out the library elf
Any help appreciated.


R,

jyunker
 
Old 03-26-2014, 02:25 PM   #5
jyunker
Member
 
Registered: Aug 2009
Posts: 167

Original Poster
Rep: Reputation: 0
The package in question is already installed.

Code:
[root@james sysconfig]# sudo yum install elfutils-libelf-devel-0.152-1.el6.x86_64
Loaded plugins: downloadonly, fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror-centos.hostingswift.com
 * elrepo: ftp.cc.uoc.gr
 * epel: mirror.nexcess.net
 * extras: mirror-centos.hostingswift.com
 * rpmforge: mirror.nexcess.net
 * updates: mirror.5ninesolutions.com
Setting up Install Process
Package elfutils-libelf-devel-0.152-1.el6.x86_64 already installed and latest version
Nothing to do
[root@james sysconfig]# sudo yum install elfutils-libelf-devel
Loaded plugins: downloadonly, fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror-centos.hostingswift.com
 * elrepo: ftp.cc.uoc.gr
 * epel: mirror.nexcess.net
 * extras: mirror-centos.hostingswift.com
 * rpmforge: mirror.nexcess.net
 * updates: mirror.5ninesolutions.com
Setting up Install Process
Package elfutils-libelf-devel-0.152-1.el6.x86_64 already installed and latest version
Nothing to do
And libelf.so is in LD_LIBARY_PATH.

So it should be finding it.


Also why did you type :

yum provides */libelf.so


instead of


yum provides libelf.so

?

Thanks in advance.

R,

jyunker
 
Old 03-26-2014, 04:20 PM   #6
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Quote:
Originally Posted by jyunker View Post
I am not sure what you are saying:


Code:
I think you have a tab instead of a space in your command line right before calling out the library elf
Any help appreciated.


R,

jyunker
The error you are getting indicates that the failing command is looking for a file named "-lelf" when it should be seeing the "-l" option to look for a library whose base name is "elf". Note the gap in your post between "-lm" and "-lelf". It looks like an error in the whitespace to me. Could be a line-wrap problem also.
 
  


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
how to rectify this error: RCC: Error in 'appchooser.qrc': Cannot find file 'akregato divya s Programming 3 04-13-2011 01:03 AM
[SOLVED] SVN checkout error:Can't find a temporary directory: Internal error jimtony Linux - Server 7 02-17-2011 09:27 PM
Find command with standard error output and mail error file montblanc Programming 2 11-11-2010 09:06 PM
MPlayer error play 3gp files error: Cannot find codec for audio format 0x726D6173 hocheetiong Linux - Software 1 08-29-2008 12:49 PM
error find bruse Linux - Newbie 2 03-13-2005 10:53 PM

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

All times are GMT -5. The time now is 11:32 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