7

I downloaded nginx from it's site for linux(I use ubuntu 10.4).I extracted nginx-1.0.6.tar.gz and there was a configure file in that directory. So I entered "./configure" command in shell. It seemed to be configured right.After I entered "make" command ,It said this error:

make -f objs/Makefile
make[1]: Entering directory `/usr/local/nginx'
cd ./auto/lib/pcre/ \
    && if [ -f Makefile ]; then make distclean; fi \
    && CC="gcc" CFLAGS="-O2 -fomit-frame-pointer -pipe " \
    ./configure --disable-shared
/bin/sh: ./configure: not found
make[1]: *** [auto/lib/pcre//Makefile] Error 127
make[1]: Leaving directory `/usr/local/nginx'
make: *** [build] Error 2

what should I do now?

2
  • How about installing it from apt-get? Commented Sep 5, 2011 at 5:37
  • 3
    apt-get will install very old version Commented Sep 5, 2011 at 5:41

9 Answers 9

5

you have to install Dependencies . generally these will be enough

libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev

so you can first install them

sudo apt-get install libpcre3 libpcre3-dev libpcrecpp0 libssl-dev zlib1g-dev

and then compile .. also make sure you run the make command as root.

Sign up to request clarification or add additional context in comments.

1 Comment

The best way to get build dependencies is “aptitude build-dep sqlite3”.
5

The ./configure program of nginx wants to find either the shared libs to build nginx dynamicaly linked or the sources of openssl prce and zlib respectivly. The obove mentioned error occurs when you invoke ../nginx/configure with the wrong options.

--with-pcre=/path/to/lib         # where libpcre.a resides
--with-openssl=/path/to/lib      # where libssl.a resides
--with-zlib=/path/to/lib         # where libz.a resides

is wrong especially when ld.so has no idea about these libs

If you build a statically linked version of nginx try instead

    --with-pcre=/path/to/src/of/pcre         
    --with-openssl=/path/to/src/of/openssl     
    --with-zlib=/path/to/src/of/zlib

e.g.
--with-pcre=../pcre-8.36 --with-openssl=../openssl-1.0.2 --with-zlib=../zlib-1.2.8

1 Comment

Arguably the best answer here -- others include solutions, this explains what's going on.
3
  1. Download PCRE from source
  2. Unzip it (do not install)
  3. Copy this path to configure (from Downloads folder)

./configure --with-pcre=/home/USER/DOWNLOADS/pcre-8.37/

Comments

1

Enter your nginx install directory - I solved this error by editing objs/Makefile and removing -Wall and -Werror params so it looks like this (second line):

CC =    gcc
CFLAGS =  -pipe  -O -W -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -g

Also, running your ./configure should initiate a long procedure of verifications to ensure that your system contains all the necessary components. If the configuration fails for any reason, check

less objs/autoconf.err

for more details. Any errors at configuration are usually based on missing dependencies for your configuration.

Comments

1

You didn't configure it right. Use these commands (in the nginx directory):

./configure --with-pcre=./auto/lib/pcre/ --with-zlib=./auto/lib/zlib/
./configure
make
sudo make install

Comments

0

Look for Ubuntu installation at http://wiki.nginx.org/Install.

Comments

0

Look for ubuntu/ centos installation at https://nodevine.com/library/installing-multiple-virtual-hosts-on-nginx-on-ubuntu-12-04-and-cent-os-6

Comments

0

We can now add the repository to install the latest version of nginx:

sudo add-apt-repository ppa:nginx/stable

Note: If this command still does not work (normally on 12.10), run the following command:

sudo apt-get install software-properties-common

This will add the repository to Ubuntu and fetches the repository's key. This is to verify that the packages have not been interfered with since they have been built. Step Three - Updating the Repositories

After adding a new repository, you will need to update the list:

sudo apt-get update

Install nginx

To install nginx or update the version you already have installed, run the following command:

sudo apt-get install nginx

Check That Nginx is Running

You can check to see that nginx is running by either going to your VPS' IP address/domain, or typing in:

service nginx status

This will tell you whether nginx is currently running.

Comments

0

with a vps debian wheezy I have to install a lot of tools in order to install nginx 1.2.9 :

apt-get install libpcre3 libpcre3-dev

apt-get install --reinstall zlibc zlib1g zlib1g-dev

apt-get install make

apt-get install sudo

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.