PDA

View Full Version : ZLib Install Error



taparker
1st September 2006, 02:21 PM
I am trying to install the latest version of ZLib in order to install Snort. I am using Fedora Core 5. Here are the steps I've done so far:

cd zlib-1.2.3
./configure; make test

(Here's where the error comes in)

Checking for gcc...
Building static library libz.a version 1.2.3 with cc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
WARNING: snprintf() not found, falling back to sprintf(). zlib
can build but will be open to possible buffer-overflow security
vulnerabilities.
Checking for return of value sprintf()... No.
WARNING: apparently sprintf() does not return a value. zlib
can build but will be open to possible string-format security
vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
cc -0 -DNO_snprintf -DHAS_sprintf_void -DNO_ERRNO_H -c -o example.o example.c
make: cc: Command not found
make: ***[example.o] Error 127

I thought that maybe it was a gcc thing, and I added the path as instructed by a coworker. I am completely new at Linux. As in this would be my first time even looking at it. I'm trying to read everything I can, but at this point, it's like trying to figure out electricity without ever having heard the language it's being explained to me in! If anyone has any advice or tips on where to go from here, I would really appreciate it. I feel like bashing my head against a brick wall - wait, bash - what the HELL is that!

Anyway, I'm not looking for someone to hold my hand on this, but I just don't know where to go from here. Thank you for your consideration.

Mariano Suárez-
1st September 2006, 02:52 PM
Be sure not to install a new libz in /usr, as tons of other things depend on it. configure without a --prefix should install to /usr/local, but then you'll end up with two copies of libz installed.

In any case: you have to have unistd.h, because it is part of the standard C include files. In FC5, it is provided by the glibc-headers package, which is required by glibc-devel, which in turn is required by gcc. But that configure log says that gcc was not found.

Did you install the gcc package?

If you didn't, install it.

taparker
1st September 2006, 02:58 PM
Be sure not to install a new libz in /usr, as tons of other things depend on it. configure without a --prefix should install to /usr/local, but then you'll end up with two copies of libz installed.

In any case: you have to have unistd.h, because it is part of the standard C include files. In FC5, it is provided by the glibc-headers package, which is required by glibc-devel, which in turn is required by gcc. But that configure log says that gcc was not found.

Did you install the gcc package?

If you didn't, install it.
When I type in "whereis gcc", I get the following:

gcc: /usr/libexec/gcc

Doesn't this mean that it's installed?

Mariano Suárez-
1st September 2006, 03:36 PM
no

{silly 10 character rule}

taparker
1st September 2006, 03:39 PM
I don't understand. If it gives a path, then why wouldn't it be installed? Is this something that comes with Fedora, or do I need to get it from somewhere else?

Mariano Suárez-
1st September 2006, 03:41 PM
You are of course free not to believe me.

If you want to know what packages are installed, say


rpm -qa
Read the rpm man page to see how that works.

In FC5, if you want to install gcc, say


yum install gccRead the man page for yum for (some) details.

taparker
1st September 2006, 04:16 PM
I absolutely believe you! Just trying to understand. I don't currently have this box connected to the internet, but I will try that as soon as I do, and post back with the results. Thanks for your help.