LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 04-13-2007, 01:52 AM   #1
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Rep: Reputation: 31
Using ldconfig!!


Hi to all,

I wanted to ask how do we use ldconfig..I'm having problems installing many packages on Fedora Core 5 with an upgraded kernel of 2.6.20.4. The kernel 2.6.20.4 was installed in the /usr/src. Packages like ebtables-v2.0.8-rc3.tar, libnetfilter_conntrack-0.0.50.tar...are not getting installed.

I've installed the ebtables package in /usr/src. I do make && make install. When I issue the command ebtables -L, I get the following error:
Quote:
ebtables: error while loading shared libraries: /usr/lib/ebtables/libebtc.so: cannot restore segment prot after reloc: Permission denied
Same thing when I installed libnfnetlink-0.0.25 and libnetfilter_conntrack-0.0.50.tar. Both packages were installed in the /usr/src folder. as follows:
Quote:
./configure
make && make install
When I do ./configure in the libnetfilter_conntrack-0.0.50 folder, I get this error:
Quote:
checking for LIBNFNETLINK... no
configure: error: Cannot find libnfnetlink >= 0.0.16
Can s.o pls help me address these problems?
Thx in advance..

Warm regards,
Visham

Last edited by vishamr2000; 04-13-2007 at 01:55 AM.
 
Old 04-13-2007, 03:37 PM   #2
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,
ldconfig is used for dynamic linking.First u have to put the path in /etc/ld.so.conf and execute the command ldconfig.I used it for linking Xine-lib and gui but that was a year back, as i currently using yum.

make sure u have correct path variable set and dependencies resolved or installed.

regards,
nirmal Tom.
 
Old 04-13-2007, 11:09 PM   #3
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
Hi to all,

WHen I issued the command below, I got the following output:
Quote:
[root@localhost libnetfilter_conntrack-0.0.50]# locate libnfnetlink.so
/usr/local/lib/libnfnetlink.so
/usr/local/lib/libnfnetlink.so.0
/usr/local/lib/libnfnetlink.so.0.2.0
/usr/src/libnfnetlink-0.0.25/src/.libs/libnfnetlink.so
/usr/src/libnfnetlink-0.0.25/src/.libs/libnfnetlink.so.0
/usr/src/libnfnetlink-0.0.25/src/.libs/libnfnetlink.so.0.2.0
My ld.so.conf file has only this line.
Quote:
include ld.so.conf.d/*.conf
I deleted that line and added this:
Quote:
/usr/local/lib
and then issued sbin/ldconfig -v | grep libnf
The output was:
Quote:
[root@localhost libnetfilter_conntrack-0.0.50]# /sbin/ldconfig -v | grep libnf
libnfnetlink.so.0 -> libnfnetlink.so.0.2.0
libnfsidmap.so.0 -> libnfsidmap.so.0.1.0
I re-issue the ./configure command in libnetfilter_conntrack-0.0.50 folder
Quote:
[root@localhost libnetfilter_conntrack-0.0.50]# ./configure
but got the same error as mentioned:
Quote:
checking for LIBNFNETLINK... no
configure: error: Cannot find libnfnetlink >= 0.0.16
What am I missing or doing wrong? I'm not sure whether I should add /usr/local/lib/ or /usr/src/libnfnetlink-0.0.25/src/.libs/. I actually tried both separately and then together, but got same output. WHich one is correct?

Pls help..

Warm regards,
Visham
 
Old 04-14-2007, 03:41 AM   #4
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,
include ld.so.conf.d/*.conf
the above line , i think is used for recursiveness

try including that too./usr/local/lib is enough

regards,
Nirmal Tom.
 
Old 04-15-2007, 12:34 AM   #5
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
I tried every combination possible, but no success..think will have to try Fedora Core 6. If that doesnt work, well, then I believe I'll have to move to another distribution

MAny thx to all who have tried to help..

Regards,
Visham
 
Old 04-15-2007, 01:02 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Quote:
include ld.so.conf.d/*.conf
You definitely want to restore this line. Then add /usr/local/lib/ to the end of the /etc/ld.so.conf file.
Then run "sudo /sbin/ldconfig". After modprobing the kernel modules you installed, you might also want to run "depmod -a" and "mkinitrd" as well. They may add the modules to your initrd. Also check if you need entries in /etc/modprobe.d/ or /etc/modprobe.conf or /etc/modprobe.conf.local. The documentation for eb_tables should tell you.

However,
Code:
ebtables: error while loading shared libraries: /usr/lib/ebtables/libebtc.so: cannot restore segment prot after reloc: Permission denied
The error message looks like the library was located, and it wasn't a problem with ldconfig at all. It may be a configuration problem with your SELinux setup instead. Did your read the output of "./configure --help" when installing the modules. Was there a --with-selinux option or something similar. You may be missing the mac controls in the kernel modules you installed or something of the sort.
 
Old 04-15-2007, 03:19 AM   #7
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
Dear jschiwal ,
Quote:
After modprobing the kernel modules you installed, you might also want to run "depmod -a" and "mkinitrd" as well.
These .so files are as if not recognised as modules by modprobe.

Quote:
Did your read the output of "./configure --help" when installing the modules. Was there a --with-selinux option or something similar.
FOr ebtables there is no 'configure' file. Only the INSTALL file:
Quote:
FOLLOW THESE SIMPLE GUIDELINES:
-------------------------------

Compiling the source code:
%make
Put the files in the right directories:
%make install

If you are using the CVS code or need your own kernel includes, do this
instead (change the include directory to the appropriate one):
%make install KERNEL_INCLUDES=/usr/src/linux/include

If you want to make a static binary for ebtables, containing all the
extensions, without shared libraries, do this (this will make a
binary called 'static', which you can rename):
%make static

WHAT GETS INSTALLED?
--------------------

- The ebtables manual gets installed in /usr/local/man/man8
To put the manual somewhere else, include MANDIR=<<man-path/man>> as
option on the command line.
The Makefile will append /man8/ebtables.8.
- ethertypes is by default placed in /etc/, if you
want to change this, include ETHERTYPESPATH=<<path>>.
- The userspace programs ebtables ebtables-save and ebtables-restore are
are copied by default to /usr/local/sbin/ebtables. If you want to put
the executables somewhere else, include BINPATH=<<path>>.
- The ebtables initialisation file (enabling use of 'service ebtables') is
copied to /etc/rc.d/init.d (change with option INITDIR)
- The ebtables configuration file (ebtables-config) is copied to /etc/sysconfig

That's all

You can also use a base directory different from the root directory (/),
using the DESTDIR option. See the Makefile for more details.


ADDITIONAL PROGRAM(S):
----------------------
-- examples/ulog/test_ulog.c --

Contains an example to receive and parse netlink messages containing
packets seen by the ebtables ulog watcher.

Compile with:
%make test_ulog.c KERNEL_INCLUDES=/usr/src/linux/include

Usage:
%examples/ulog/test_ulog NETLINK_GROUP
%ebtables -A chain --ulog-nlgroup NETLINK_GROUP

-- examples/perf_test/perf_test --

A test script to compare the performance for the different ways to
construct an ebtables table. This is deprecated and should probably
be ignored.
As for libnetfilter_conntrack-0.0.50, the configure file says this:
Quote:
`configure' configures this package to adapt to many kinds of systems.

Usage: ./configure [OPTION]... [VAR=VALUE]...

To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.

Defaults for the options are specified in brackets.

Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']

Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]

By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.

For better control, use the options below.

Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]

Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names

System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]

Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--disable-dependency-tracking Speeds up one-time builds
--enable-dependency-tracking Do not reject slow dependency extractors
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)

Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags[=TAGS] include additional configurations [automatic]

Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
CXXCPP C++ preprocessor
F77 Fortran 77 compiler command
FFLAGS Fortran 77 compiler flags
PKG_CONFIG path to pkg-config utility
LIBNFNETLINK_CFLAGS
C compiler flags for LIBNFNETLINK, overriding pkg-config
LIBNFNETLINK_LIBS
linker flags for LIBNFNETLINK, overriding pkg-config

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
I tried the things you said but still no success..
 
Old 04-15-2007, 05:04 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I thought that ebtables installed a netfilter hook or kernel module. Looking at the kernel source, I see that they are already there. You may need to modprobe modules such as bridge, ebtables and ebtables_broute. The exact modules you need may depend on what you want to do.

Take a look at the kernel modules in /net/bridge/netfilter/.

If you built this kernel, did you select the modules that you need?

I noticed that for SuSE, there is a package for the userland ebtables command. Is the same true for Fedora Core? You might try searching for one at the http://rpm.pbone.net website. Filter the search for your particular Distro and version.

Some of links on this site may be useful:
http://ebtables.sourceforge.net/documentation.html#what

Last edited by jschiwal; 04-15-2007 at 05:10 AM.
 
Old 04-15-2007, 06:19 AM   #9
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi
make install KERNEL_INCLUDES=[kernel path]

is kernel headers installed?if so , try its path using above!

regards,
Nirmal Tom.
 
Old 04-15-2007, 09:41 AM   #10
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
Hi to all,

I've been using the ebtables software for quite some time now..I did what I normally do when I install the ebtables package (like selecting kernel options, ebtables compiling steps..). It is actually the first time I got such errors. Markkuk from the FedoraForum.org told me that it may be due to SELinux being used.

The use of this command corrected the ebtables error:
Quote:
You must fix the SELinux context of the libraries giving that error by:
Code:
chcon -t texrel_shlib_t /usr/lib/ebtables/libebtc.so
However, the problem with libnetfilter_conntrack-0.0.50 is still puzzling me..I even disabled SELinux alltogether by adding the selinux=0 kernel parameter in grub.conf.. but still no success.

I googled for the error I got and I saw some posts in other posts regarding this..but there too, no solution.

Any thought on what the problem might be?

MAny thx to all for trying to help me out..

Warm regards,
Visham
 
Old 04-16-2007, 04:01 AM   #11
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
Hi to all,

Do we have to upgrade gcc on Fedora Core 5? I got a message during kernel compilation saying that gcc version 4.1.0 causes errors when compiling.

Warm regards,
Visham
 
Old 04-18-2007, 05:43 AM   #12
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
Hi to all,

I managed to get libnfnetlink-0.0.25 and libnetfilter_conntrack-0.0.50 installed by doing this:
Quote:
./configure --prefix=/usr
make
make install
for both packages above. However, when I do the same thing in the folder conntrackd, I get stuck when I issue 'make'. I get the following errors:
Quote:
In file included from /usr/include/sys/uio.h:24,
from /usr/include/sys/socket.h:27,
from /usr/local/include/libnfnetlink/libnfnetlink.h:19,
from proxy.c:19:
/usr/include/sys/types.h:62: error: conflicting types for ‘dev_t’
/usr/include/linux/types.h:10: error: previous declaration of ‘dev_t’ was here
/usr/include/sys/types.h:67: error: conflicting types for ‘gid_t’
/usr/include/linux/types.h:21: error: previous declaration of ‘gid_t’ was here
/usr/include/sys/types.h:72: error: conflicting types for ‘mode_t’
/usr/include/linux/types.h:12: error: previous declaration of ‘mode_t’ was here
/usr/include/sys/types.h:77: error: conflicting types for ‘nlink_t’
/usr/include/linux/types.h:13: error: previous declaration of ‘nlink_t’ was here
/usr/include/sys/types.h:82: error: conflicting types for ‘uid_t’
/usr/include/linux/types.h:20: error: previous declaration of ‘uid_t’ was here
In file included from /usr/include/sys/types.h:220,
from /usr/include/sys/uio.h:24,
from /usr/include/sys/socket.h:27,
from /usr/local/include/libnfnetlink/libnfnetlink.h:19,
from proxy.c:19:
/usr/include/sys/select.h:78: error: conflicting types for ‘fd_set’
/usr/include/linux/types.h:9: error: previous declaration of ‘fd_set’ was here
make[1]: *** [proxy.o] Error 1
make[1]: Leaving directory `/usr/src/conntrackd-0.9.2/src'
make: *** [all-recursive] Error 1
[root@localhost conntrackd-0.9.2]#
Can someone tell me why am I getting these errors and how to solve it?

Warm regards,
Visham
 
Old 04-19-2007, 12:39 AM   #13
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,
is the package intended for the kernel version u r running?
regards,
Nirmal Tom
 
Old 04-20-2007, 12:26 AM   #14
vishamr2000
Member
 
Registered: Aug 2004
Posts: 210

Original Poster
Rep: Reputation: 31
yes it requires at least a 2.6.18 kernel. I dont know how to corect this. I like using Fedora Core but I think i'll have to shift to another distribution like Debian or kubuntu.

Regards,
Visham
 
Old 04-20-2007, 04:10 AM   #15
nirmaltom
Member
 
Registered: Jun 2005
Location: India
Distribution: Redhat,Fedora,DSL,Ubuntu
Posts: 238

Rep: Reputation: 30
hi,
if u dont find a stable release for ur updated kernel,
try downloading the development packages for the software using svn ,cvs or git they support.Bcaz all the projects are maintained to be in support with the mainline kernel.
regards,
Nirmal Tom.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
What is ldconfig? MicahCarrick Linux - Software 2 10-03-2005 06:31 PM
where is ldconfig ? trutnev Red Hat 3 06-01-2005 12:05 PM
ldconfig diefree Fedora 4 12-11-2004 02:20 AM
what does ldconfig do ? rajorshi Slackware 8 09-14-2004 04:19 PM
ldconfig gui10 Slackware 3 05-14-2002 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:13 AM.

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