LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing libmcrypt (errors appear in configure command). thanks. (https://www.linuxquestions.org/questions/linux-newbie-8/installing-libmcrypt-errors-appear-in-configure-command-thanks-740535/)

broke 07-16-2009 08:27 AM

Installing libmcrypt (errors appear in configure command). thanks.
 
Hello,

I want to configure NSCA plugin (used with Nagios).
when I do the configure command I get from the NSCA the following:

checking for libmcrypt-config... no
checking for libmcrypt - version >= 2.4.11... no
*** Could not run libmcrypt test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you
*** may want to edit the libmcrypt-config script: no

So I've downloaded and extracted libmcrypt from:
http://sourceforge.net/projects/mcrypt/files/

when trying to configure libmcrypt I get:

[broken@localhost mcrypt-2.6.8]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 98304
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for libmcrypt-config... no
checking for libmcrypt - version >= 2.5.0... no
*** Could not run libmcrypt test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you
*** may want to edit the libmcrypt-config script: no
configure: error: *** libmcrypt was not found
[broken@localhost mcrypt-2.6.8[

I'm not sure what EXACTLY the steps I need to do to handle it.
I've googled and understood it might related to ldconfig or ld.so.conf

The files were extracted to :
/root/nagiosinstall/mcrypt-2.6.8

And ld.so.conf in /etc Contain:
include ld.so.conf.d/*.conf

can you share ideas (and if you can be specific with the syntax, locations, commands etc).
for example "open file named XXX in location /etc and edit it. Add the line XXXXXX and then run configure again. This will update AAA".
Btw, I'm using Red Hat Enterprise 4 if that counts.

Thank you.

tuxrules 07-16-2009 10:08 AM

are you trying to install mcrypt or libmcrypt? Looking at your bash prompt, you seem to be compiling mcrypt which requires libmcrypt. First install libmcrypt and then mcrypt.

You can use Red Hat's package manager to search and install libmcrypt and mcrypt. Installing it via Red Hat package manager will be much easier instead of manual compile.

jeromeNP7 07-17-2009 11:33 AM

Installing both libmcrypt and mcrypt is probably much easier when using some package manager like apt or yum or yast.

Linux

broke 07-26-2009 02:35 AM

Hello again.
I'm trying to install libmcrypt since in the NSCA plugin installation I get errors referring to libmcrypt (as you can see in the log above).
"configure: error: *** libmcrypt was not found"
When I choose to download libmcrypt from Freshmeat
http://freshmeat.net/projects/libmcrypt
it forwards me to download mcrypt so I thought this is what I need to have so thanks for supplying info about this issue.
So in the bottom line I need to have them both? First I need to install libmcrypt and than mcrypt in that order?
Btw, what sources can I use to get libmcrypt and mcrypt? Reminder: I have Red Hat enterprise 4 machine.
I have to do in manually since it's a machine that is offline and I just can pass files to it one by one.
Thanks again.

broke 07-26-2009 03:04 AM

for example
http://rpm.pbone.net/index.php3/stat....i386.rpm.html

broke 07-26-2009 04:17 AM

Ok. I've installed the libmcrypt rpm from the link above.
As far as I understand It was installed correctly, I can see:

[root@localhost install]# rpm -Uvh libmcrypt-2.5.7-5.el4.i386.rpm
warning: libmcrypt-2.5.7-5.el4.i386.rpm: V3 DSA signature: NOKEY, key ID 217521f6
Preparing... ########################################### [100%]
1:libmcrypt ########################################### [100%]
[root@localhost install]# pwd
/root/install

But, when I'm trying now to install mcrypt (from an inner directory as you can see below) , I'm getting errors like it cannot find libmcrypt or something.

[root@localhost install]# cd mcrypt-2.6.8
[root@localhost mcrypt-2.6.8]# ls
ABOUT-NLS ChangeLog config.rpath COPYING INSTALL.generic Makefile.am po TODO
acinclude.m4 config.guess config.sub depcomp install-sh Makefile.in README
aclocal.m4 config.h.in configure doc ltmain.sh missing src
AUTHORS config.log configure.in INSTALL m4 NEWS THANKS

[root@localhost mcrypt-2.6.8]# ./configure checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
...etc...etc....
checking for libmcrypt-config... no
checking for libmcrypt - version >= 2.5.0... no
*** Could not run libmcrypt test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed
*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you
*** may want to edit the libmcrypt-config script: no
configure: error: *** libmcrypt was not found

I assume I need to tell mcrypt where to find libmcrypt or how to refer to it,right? but how?
In the log libmcrypt-config was mentioned but I couldn't find such one (did I installed libmcrypt ok?)

[root@localhost mcrypt-2.6.8]# find / -name '*libmcrypt*' -print
/root/install/libmcrypt-2.5.7-5.el4.i386.rpm
/usr/share/doc/libmcrypt-2.5.7
/usr/lib/libmcrypt.so.4
/usr/lib/libmcrypt.so.4.4.7
[root@localhost mcrypt-2.6.8]#

Any ideas how to proceed?

broke 07-26-2009 08:12 AM

After updatedb command and locate libmcrypt I can find those:
/usr/lib/mcrypt.so.4 and
/usr/lib/mcrypt.so.4.so.4.4.7

Do I need to update /etc/ld.so.conf?
I've tried for example to have this file like:

include ld.so.conf.d/*.conf
/usr/lib/libmcrypt.so.4
And like:
include ld.so.conf.d/*.conf
include /usr/lib/libmcrypt.so.4

But still have no idea how to solve it.
Btw, when trying to do:

[root@localhost install]# rpm -i libmcrypt-2.5.7-5.el4.i386.rpm
warning: libmcrypt-2.5.7-5.el4.i386.rpm: V3 DSA signature: NOKEY, key ID 217521f6
package libmcrypt-2.5.7-5.el4 is already installed
[root@localhost install]#

And there's other thread related with the same questions but without a definite answer.
http://www.linuxquestions.org/questi...server-606925/

centosfan 08-13-2009 10:19 AM

I have also problem with this.

knudfl 08-13-2009 12:09 PM

yum search mcrypt
# yum -y install libmcrypt-devel

When 'configure' asks for <name> it almost always means
' lib <name> -devel '.

.....

centosfan 08-13-2009 12:17 PM

Never mind,resolved it.Now i have both libmcrypt and mcrypt compiled from source.I know it can be also installed over yum
but that is not always reliable and i more prefer to have native installs.Anyway solution to this problem is to simply add location of libmcrypt.so.4 file.My libmcrypt.so.4 was located on /usr/local/lib/ ,which i found it by command locate libmcrypt.so.4.(run command updatedb before for every case)Then go to directory /etc/ld.so.conf.d/ ,and there you will see conf files.You can either create new conf file called mcrypt.conf or simply add /usr/local/lib/ (or whatever is file libmcrypt.so.4 located)to new line,save file and
then run ldconfig.And it will work then.


All times are GMT -5. The time now is 05:26 PM.