R
R
Ruslan Leviev2011-05-07 10:33:15
linux
Ruslan Leviev, 2011-05-07 10:33:15

Compiling nginx 1.0.1?

There is a server based on Ubuntu 9.10. I'm trying to install nginx-1.0.1 on it. Yes, I know that you can install via apt-get install nginx , but I need it via compilation. Options and ./configure :

--with-pcre=/root/pcre-8.12 \
--error-log-path=/var/log/nginx.error.log \
--http-log-path=/var/log/nginx.access.log \
--user=www \
--group=www \
--with-zlib=/root/zlib-1.2.5 \
--with-openssl=/root/openssl-1.0.0d \
--with-http_ssl_module

The configuration runs fine, no errors are thrown. Next, I enter the make command , the creation of object files begins, and at the end it issues:
In file included from /usr/include/features.h:378,
                 from /usr/include/stdlib.h:25,
                 from cryptlib.h:62,
                 from cryptlib.c:117:
/usr/include/gnu/stubs.h:9:27: error: gnu/stubs-64.h: No such file or directory
make[3]: *** [cryptlib.o] Error 1
make[3]: Leaving directory `/root/openssl-1.0.0d/crypto'
make[2]: *** [build_crypto] Error 1
make[2]: Leaving directory `/root/openssl-1.0.0d'
make[1]: *** [/root/openssl-1.0.0d/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory `/root/nginx-1.0.1'
make: *** [build] Error 2

Those. it cannot find the stubs-64.h file . Googling shows that this is a file from glibc-devel , which on Ubuntu is called libc6-dev . I do apt-get install libc6 -dev , he says that I already have the latest version.
I also tried to add a line in the configuration option: but the result is absolutely the same. I also did apt-get install gcc, apt-get install g++ to eliminate all dependencies - it did not help. Where to find this file? UPDATE: The problem was solved by installing apt-get install libc6-dev-amd64 , but now after a long "make" it gives me:
--with-cc-opt="-m32 -march=i386"



/usr/bin/ld: i386:x86-64 architecture of input file `/root/openssl-1.0.0d/.openssl/lib/libcrypto.a(bio_asn1.o)' is incompatible with i386 output
/usr/bin/ld: final link failed: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [objs/nginx] Error 1
make[1]: Leaving directory `/root/nginx-1.0.1'
make: *** [build] Error 2

Answer the question

In order to leave comments, you need to log in

4 answer(s)
U
umcherrel, 2011-05-07
@umcherrel

if you need x86_64 then remove:
--with-cc-opt="-m32 -march=i386"
or install openssl-dev package for 32-bit architecture

M
multifinger, 2011-05-08
@multifinger

This happens when the version of the required package differs from the installed one.
Sometimes aptitude handles dependencies better and does things where regular "powders" can't.
I would try reinstalling (apt-get purge, aptitude update && aptitude install) openssl-dev and then libc6-dev

K
korotovsky, 2011-05-07
@korotovsky

Do you already sudo apt-get build-dep nginx

O
Obramko, 2011-05-29
@Obramko

> now after a long "make" it gives me
Remove--with-cc-opt="-m32 -march=i386"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question