A
A
antonre2012-09-21 20:15:05
Nginx
antonre, 2012-09-21 20:15:05

Can't run ./configure for nginx

Trying to install nginx-1.2.3:

1) wget www.nginx.org/download/nginx-1.2.3.tar.gz
2) tar xzvf nginx-*
3) cd nginx-*

4) ./configure gives the following:

checking for OS
+ Linux 3.0.0-24-generic i686
checking for C compiler ... not found
./configure: error: C compiler gcc is not found


While gcc is installed:

/tmp/nginx-1.2.3$ gcc -v
Используются внутренние спецификации.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6.1/lto-wrapper
Целевая архитектура: i686-linux-gnu
Параметры конфигурации: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Модель многопоточности: posix
gcc версия 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 



What could be the problem?

Of course, you can install apt-get install nginx - but then how do I enable / disable certain modules. Maybe someone will tell?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
I
Ilya Plotnikov, 2012-09-21
@ilyaplot

By using make install you are automatically creating problems for yourself. Make .deb and install if not in apt. But in general

[email protected]:~$ apt-cache search nginx
collectd-core - statistics collection and monitoring daemon (core system)
fcgiwrap - simple server to run CGI applications over FastCGI
gitweb - fast, scalable, distributed revision control system (web interface)
gunicorn - Event-based HTTP/WSGI server
libplack-middleware-file-sass-perl - Sass and SCSS support for all Plack-based P                                                                                        SGI frameworks
nginx - small, but very powerful and efficient web server and mail proxy
nginx-common - small, but very powerful and efficient web server (common files)
nginx-doc - small, but very powerful and efficient web server (documentation)
nginx-extras - nginx web server with full set of core modules and extras
nginx-extras-dbg - Debugging symbols for nginx (extras)
nginx-full - nginx web server with full set of core modules
nginx-full-dbg - Debugging symbols for nginx (full)
nginx-light - nginx web server with minimal set of core modules
nginx-light-dbg - Debugging symbols for nginx (light)
nginx-naxsi - nginx web server with naxsi 0.44 included
nginx-naxsi-dbg - Debugging symbols for nginx (naxsi)
stud - scalable TLS unwrapping daemon
uwsgi-extra - fast, self-healing application container server (extra files)

V
Vampiro, 2012-09-21
@Vampiro

imho using apt-get it is possible to install modules. At the extreme, assemble the modules separately. Why make-up when you have cow superpower?

K
kwinch, 2012-09-28
@kwinch

Recently I installed nginx on a server with Ubuntu 12.04 and also faced the need to add non-standard modules.
I found the solution on serverfault .
After using the proposed method, nginx will be installed on the system using apt-get (i.e. the system will be aware that nginx is installed on it).
First you need to install the tools for building deb packages:

sudo apt-get install dpkg-dev

You also need to add the nginx repository in order to have access to the latest versions of the server:
sudo add-apt-repository ppa:nginx/stable

After adding the repository, you must manually add the repository with the sources in the file /etc/apt/sources.list.d/nginx-stable-lucid.list:
To update the list of packages with the new repositories, execute:
sudo apt-get update

These were the preparations. Next, the actual assembly of nginx with the necessary modules.
Go to the folder where you want to download the nginx sources and run:
apt-get source nginx

Build nginx dependencies:
sudo apt-get build-dep nginx

In the same folder where the nginx sources were downloaded, download the necessary modules and add links to them to the nginx configuration line in the file <директория с исходниками nginx>/nginx-1.2.3/debian/rules:
config.status.full: config.env.full config.sub config.guess
...
--add-module=path/to/nginx_uploadprogress_module

After that, we collect the package (s):
cd nginx-1.2.3 && dpkg-buildpackage -b

Note: This will build multiple packages as specified in debian/rules. You need to install only one, the one that is full (see below).
Install nginx:
sudo dpkg -i nginx-full_1.2.3-0ubuntu0ppa3~precise_amd64.deb

Although it looks intimidating, for the second or third time already on the machine.
Note: If after using this method to do apt-get upgrade, then nginx will be rearranged with the default config. Be careful.

P
pentarh, 2012-09-21
@pentarh

1. Find out the path to gcc:
# which gcc
2. Write it explicitly:
# CC=/path/to/gcc ./configure --blah-blah-blah
3. ???
4. PROFIT!

G
gricom, 2012-09-21
@gricom

add a symlink to gcc in /usr/bin so you don't have to write the path each time

P
Puma Thailand, 2012-09-24
@opium

Tell us why the heck are you compiling it from source, and why the heck are you compiling php from source, gcc are you also compiling from source 8)?
Everything is generally installed from apt-get install or aptitude install.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question