nginx install on linux - nginx

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?

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.

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

Download PCRE from source
Unzip it (do not install)
Copy this path to configure (from Downloads folder)
./configure --with-pcre=/home/USER/DOWNLOADS/pcre-8.37/

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.

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

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

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

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.

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

Related

./configure: error: the HTTP gzip module requires the zlib library

I am new to dockers/containers.
I am trying to run a fork with a fix I have put in for openSSL vulnerability of mup-frontend using the following command:
docker build ./
It compiles to a point then errors with
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.
I am running a mac so installed zlib with brew. I have searched long and hard but cannot find much on this error.
Because of this error it also fails to build on automation in docker.io
The Dockerfile you reference at
https://github.com/meteorhacks/mup-frontend-server/blob/master/Dockerfile
starts with
FROM debian
so you will need to have such a line in your Dockerfile, before the place where you need zlib
RUN apt-get update && apt-get install -y \
zlib \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
in one RUN, you update, install and clean
yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel
Download required packages
cd
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
wget http://zlib.net/zlib-1.2.5.tar.gz
wget ftp://ftp.openssl.org/source/openssl-0.9.8o.tar.gz
Now you have to untar these files.
tar -xvf zlib-1.2.5.tar.gz
tar -xvf pcre-8.10.tar.gz
tar -xvf openssl-0.9.8o.tar.gz

Build error in OpenWRT

I followed the following steps given on the OpenWrt website to setup the OpenWrt build system.
sudo apt-get update
sudo apt-get install git-core build-essential libssl-dev libncurses5-dev unzip gawk zlib1g-dev
git clone https://github.com/openwrt/openwrt.git
git clone -b chaos_calmer git://github.com/openwrt/openwrt.git
cd openwrt
./scripts/feeds update -a
./scripts/feeds install -a
I made the necessary changes in the configuration file and ran the make command. It gives the following error: make: *** [world] Error 1
Any solutions?
use following command options to know the exact error you are getting
make -j1 V=s
Sometimes due to slow internet speed(while fetching package source code for openwrt) or due to less RAM availability or wrong configuration leads to this error. Post the error message block you are getting, to understand more about the problem.
Please, follow up the following prerequisities:
https://wiki.openwrt.org/doc/howto/buildroot.exigence
Take a look especially at the table "Table of known prerequisites and their corresponding packages".
You have to install version7 of gcc and g++ so Try this:
sudo apt install gcc-7 g++-7 build-essential
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 7
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 7

Cloudbees dev cloud + Capybara-webkit(Qt) how to use?

I want to run capybara-webkit in cloudbees, but I met this error in bundle
SocketCommand.h:4:19: fatal error: QObject: No such file or directory
compilation terminated.
I want to install Qt.
$ sudo apt-get install libqt4-dev
sudo: no tty present and no askpass program specified
$ apt-get install libqt4-dev
apt-get: command not found
How to install Qt? jenkins-plugin?
QT libraries are already installed on DEV#Cloud slaves,
to install capybara gem, you need to set
QMAKE=/usr/bin/qmake-qt4
then run cloudbees ruby add-on script
curl -s -o use-ruby https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/ruby/use-ruby
RUBY_VERSION=1.9.3-p327
source ./use-ruby
and setup your build script to install dependencies
gem install --conservative bundler
bundle install
(or equivalent)

C compiler gcc not found while installing passenger and nginx

I'm trying to install Passenger and Nginx on my VPS.
I followed these instructions and replaced all links of all sources to the current version.
But when i ran the Phusion Passenger installer for Nginx, something with gcc compiler went wrong:
Compiling and installing Nginx...
# sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --with-http_gzip_static_module --with-cc-opt='-Wno-error' --add-module='/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/ext/nginx'
checking for OS
+ Linux 2.6.32-220.el6.x86_64 x86_64
checking for C compiler ... not found
./configure: error: C compiler gcc is not found
What should I do?
OBS: My VPS works with CentOS 6.2 x64
Have the same problem and the following commands solve it; (on ubuntu server)
sudo apt-get install linux-kernel-headers
sudo apt-get install build-essential
If you do have gcc installed, the problem stems from /tmp being mounted as noexec. The error doesn't exactly help, but if you remount /tmp as exec you can install passenger properly.
mount -o remount,rw,exec,nosuid /tmp
Got the same error. Just installed gcc and it started working:
yum install gcc
same problem here and I found out that I am not able to run command as root
has to use
sudo
and it worked like charm
Be sure that you sudo, if applicable.
Example:
sudo ./configure ...
One quick hack (I struggled a lot with it and finally install pre-built) is to install the pre-built package of Nginx rather than compiling it from source.
For RHEL/CentOS create the file named /etc/yum.repos.d/nginx.repo with the following contents:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/OS/OSRELEASE/$basearch/
gpgcheck=0
enabled=1
In above baseurl replace “OS” with “centos” and “OSRELEASE” with “6”.
Finally execute yum install nginx
Reference https://nginx.org/en/linux_packages.html#stable

/usr/bin/ld: cannot find -lfreetype Why? And how can I make it work?

Exact duplicate:
/usr/bin/ld: cannot find -lfreetype qt
Hi, I'm writing a cross-platform Qt application for a graduate project.
I've been working with Qt 4.3, but just recently upgraded to 4.5.
On my Windows machine, it works great. No problems. However, on my Linux machine, things aren't quite so nice.
I'm using the Qt creator and it goes through the compiling process making all the object files. But then it makes a call to:
g++ -Wl, -rpath, (all the .o files here) -L/media/HOME/Qt-Linux-4.5/qt/lib -lQtGui -L/media/HOME/Qt-Linux-4.5/qt/lib -L/usr/X11R6/lib -pthread -lfreetype -lgobject-2.0 -lrt -lglib-2.0 -ldl -lpthread
It gives me the error:
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
Now, I can locate libfreetype.so.6 and libfreetype.so.6.3.18 in my /usr/lib folders. I've tried running this inserting -L/usr/lib, but that didn't work. I've tried ln -s /usr/lib/libfreetype.so.6.3.18 libfreetype.so, I've tried editing the ld.so.conf file.
I'm trying this on an eeepc with Eeebuntu, if that helps.
Help!! I've been trying to get this to work for two days. I don't know what else I can do. Any suggestions?
Thanks much!
Brent
You missing dev librart, install libfreetypeX-dev, in debian lenny it would be apt-get install libfreetype6-dev
sudo apt-get install libfreetype6-dev
I've tried ln -s /usr/lib/libfreetype.so.6.3.18 libfreetype.so
Never do things like that unless you want to break your system and learn how to fix it
These I had to install on Kubuntu 9.04 64 bit in order to get a simple test app to build:
sudo apt-get install libfreetype6-dev
sudo apt-get install libavahi-gobject-dev
sudo apt-get install libSM-dev
sudo apt-get install libXrender-dev
sudo apt-get install libfontconfig-dev
sudo apt-get install libXext-dev
Edit: To get OpenGL to build I also had to install libgl1-mesa-dev and freeglut3-dev.
Edit2: Audio required libphonon-dev.
Thanks a lot! Installing the dev libraries got it to work. there were about five more libraries I had to install as well, but once I got them all, everything compiles just fine. Thanks a lot everyone!
When you did your ln -s /usr/lib/libfreetype.so.6.3.18 libfreetype.so, did you make sure that the libfreetype.so symlink ended up in /usr/lib too? To be sure, run ls -l /usr/lib/libfreetype.so and make sure it says what you expect it to.

Resources