I’m trying to install nginx 1.13.1
from source on Ubuntu 16.04
. My configure command is the following:
./configure --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads --with-http_realip_module
The configure command work fine. But when I’m trying to compile it using make
, it shows make[1]: Leaving directory '/root/nginx/nginx-1.13.1'
and exit after some compilation messages. The binaries aren’t updated.
The log of all commands: https://hastebin.com/sohuwivuto.pl
I ran the following commands:
(The configure plugin)
make
make install
asked Jun 15, 2017 at 0:40
5
Shameless answer for points.
The binary is located in the wrong location due to having:
- The PATH set to /usr/share/nginx
- Not set —sbin-path=/usr/sbin/nginx
Fix your ./configure arguments as needed. If you write ./configure --help
you will be presented with arguments available. If unsure about any of them, consult documentation.
answered Jun 15, 2017 at 15:50
Have a look at my Nginx tutorial, that includes how to build it.
They key parts for you are the two make lines, particular «make install». The configure line may not be right for you.
./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_gunzip_module --with-http_gzip_static_module --with-threads --with-file-aio --with-http_v2_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=native' --add-module=../ngx_cache_purge-2.3 --add-module=../headers-more-nginx-module
make && make install
make clean (NB: optional)
service nginx start
answered Jun 15, 2017 at 0:48
TimTim
31.1k7 gold badges49 silver badges77 bronze badges
4
Indicate troubleshooting steps taken
- Ran
brew update
and retried your prior step? - Ran
brew doctor
, fixed as many issues as possible and retried your prior step? - Checked that a similar issue hasn’t already been filed?
- Looked up the software bug tracker if reporting a build error?
- If you’re seeing permission errors tried running
sudo chown -R $(whoami) $(brew --prefix)
?
Bug reports / build errors:
Last 15 lines from /home/nitin/.cache/Homebrew/Logs/nginx-full/02.make:
uscf->health_expected.len = value[1].len;
^
/home/linuxbrew/.linuxbrew/share/healthcheck-nginx-module/ngx_http_healthcheck_module.c: In function 'ngx_http_healthcheck_buffer':
/home/linuxbrew/.linuxbrew/share/healthcheck-nginx-module/ngx_http_healthcheck_module.c:1108:9: error: 'ngx_http_upstream_srv_conf_t {aka struct ngx_http_upstream_srv_conf_s}' has no member named 'health_buffersize'
uscf->health_buffersize = ngx_atoi(value[1].data, value[1].len);
^
/home/linuxbrew/.linuxbrew/share/healthcheck-nginx-module/ngx_http_healthcheck_module.c:1109:13: error: 'ngx_http_upstream_srv_conf_t {aka struct ngx_http_upstream_srv_conf_s}' has no member named 'health_buffersize'
if (uscf->health_buffersize == NGX_ERROR) {
^
objs/Makefile:1180: recipe for target 'objs/addon/healthcheck-nginx-module/ngx_http_healthcheck_module.o' failed
make[1]: *** [objs/addon/healthcheck-nginx-module/ngx_http_healthcheck_module.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/tmp/nginx-full-20170307-13321-9vok16/nginx-1.10.3'
Makefile:11: recipe for target 'install' failed
make: *** [install] Error 2
Brief summary of issue:
i am tying to build nginx-full formula with health check and it is not able to build.
The complete command that you issued:
brew install homebrew/nginx/nginx-full --with-healthcheck-module
Gist with output of brew doctor
:
Your system is ready to brew.
Link output by brew gist-logs <formula>
:
https://gist.github.com/8d79f03a6fb8c436c98e3e4b28740d60
Output of brew config
:
HOMEBREW_VERSION: 1.1.10
ORIGIN: https://github.com/Linuxbrew/brew
HEAD: d8c8b867bf99c604c89bc848f58d1fae8afd599c
Last commit: 2 weeks ago
Core tap ORIGIN: https://github.com/Linuxbrew/homebrew-core
Core tap HEAD: 7b0514732ff5bd83f14d8291b5c37c3b1181e59a
Core tap last commit: 3 hours ago
HOMEBREW_PREFIX: /home/linuxbrew/.linuxbrew
HOMEBREW_REPOSITORY: /home/linuxbrew/.linuxbrew
HOMEBREW_CELLAR: /home/linuxbrew/.linuxbrew/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://linuxbrew.bintray.com
CPU: quad-core 64-bit sandybridge
Homebrew Ruby: 2.3.1 => /usr/bin/ruby2.3
Clang: 3.9 build
Git: 2.7.4 => /usr/bin/git
Perl: /usr/bin/perl
Python: /home/linuxbrew/.linuxbrew/bin/python => /home/linuxbrew/.linuxbrew/Cellar/python/2.7.13/bin/python2.7
Ruby: /usr/bin/ruby => /usr/bin/ruby2.3
Java: 1.8.0_112
Kernel: Linux 4.4.0-59-generic x86_64 GNU/Linux
OS: Linux Mint 18.1 Serena
Codename: serena
OS glibc: 2.23
OS gcc: 5.4.0
Linuxbrew glibc: N/A
Linuxbrew gcc: 5.3.0
Linuxbrew xorg: N/A
Formula Requests:
The quickest way to get a new formula into Homebrew is to file a Pull Request.
We will consider your request but it may be closed if it’s something we’re not actively planning to work on.
UFHH01
Guest
-
#1
Hi all Pleskians,
Global informations for this Plesk — contribution:
I noticed, that Plesk doesn’t provide a decent solution/description/documentation on «How to compile NGINX with additional modules» yet and unfortunately, there is no KB — article for this as well, which provides the necessary steps.
Some Plesk — users just don’t want to wait for NGINX features, which are global standards by now ( i.e. Google Pagespeed, the availability to use the «cache_purge» — module, or to use the «headers_more» — features ) and sometimes, they don’t want to wait for Plesk updates/upgrades/patches for actual NGINX releases, to be «up-to-date» for their customers.
Pls. note, that this thread just describes the COMPILING STEPS and not possible NGINX — configurations, because that would go beyond the scope. If you desire help for depending configurations, pls. consider to open a NEW thread in the forum.
To start:
Be sure that you have the following packages installed on your server, before you start ( depending to your operating system, this list might vary! ):
«gcc-c++» «pcre-devel» / «libpcre3«+»libpcre3-dev» «zlib-devel» / «zlib1g-dev» «make» «unzip» «Development Tools» «build-essential«
On CentOS/RHEL — based — systems, you could use the example — command:
Code:
yum group install "Development Tools"
or
yum groupinstall "Development Tools"
or/and
Code:
yum install gcc-c++ pcre-devel zlib-devel make unzip
and optional, if not already installed:
Code:
yum install perl-XML-LibXML libxslt-devel libxslt-python perl-XML-LibXSLT gd-devel libXpm-devel perl-ExtUtils-Embed gperftools gperftools-devel
On Debian/Ubuntu — based systems, you would use the example — command:
Code:
aptitude install build-essential zlib1g-dev libpcre3 libpcre3-dev unzip
and optional, if not already installed:
Code:
aptitude install libperl-dev libxml-libxml-perl libxml2-dev libxml2-utils python-libxml2 libxslt1.1 libxslt1-dev python-libxslt1 libxml-filter-xslt-perl libxml-libxslt-perl libgd-dev libgd-perl libgd-text-perl python-gd libgoogle-perftools4 libgoogle-perftools-dev
Let’s start with the «step-by-step guide»:
1. Please check the latest releases ( NGINX and possible modules ):
2. Next, pls. consider to prepare your server with download folders and download the desired NGINX — version and ( possible ) modules:
Code:
mkdir -p /root/addons/nginx && cd /root/addons/nginx
Currently, the latest ( current ) NGINX — version is 1.13.6, so you would continue with:
Code:
http://nginx.org/download/nginx-1.13.6.tar.gz
tar -xvf nginx-1.13.6.tar.gz
cd /root/addons/nginx/nginx-1.13.6
… and you could now continue with the above mentioned modules — downloads:
Code:
wget https://github.com/FRiCKLE/ngx_cache_purge/archive/2.3.tar.gz
wget https://github.com/FRiCKLE/ngx_coolkit/archive/0.2.tar.gz
wget https://github.com/FRiCKLE/ngx_slowfs_cache/archive/1.10.tar.gz
wget https://github.com/openresty/headers-more-nginx-module/archive/v0.32.tar.gz
wget https://github.com/pagespeed/ngx_pagespeed/archive/v1.12.34.3-stable.tar.gz
3. We need to extract the downloaded NGINX — version and the ( possible ) modules:
( Because I like it «tidy» on my servers, I rename files and folders sometimes )
Code:
mv 2.3.tar.gz ngx_cache_purge-2.3.tar.gz
tar -xvf ngx_cache_purge-2.3.tar.gz
mv 0.2.tar.gz ngx_coolkit-0.2.tar.gz
tar -xvf ngx_coolkit-0.2.tar.gz
mv 1.10.tar.gz ngx_slowfs_cache-1.10.tar.gz
tar -xvf ngx_slowfs_cache-1.10.tar.gz
mv v0.32.tar.gz ngx_headers-more-v0.32.tar.gz
tar -xvf ngx_headers-more-v0.32.tar.gz
mv headers-more-nginx-module-0.32 ngx_headers-more-0.32
tar -xzf v1.12.34.3-stable.tar.gz
cd ngx_pagespeed-1.12.34.3-stable
wget https://dl.google.com/dl/page-speed/psol/1.12.34.2-x64.tar.gz
tar -xzvf 1.12.34.2-x64.tar.gz
rm 1.12.34.2-x64.tar.gz
cd ..
rm *.gz
4. Here is a NEW part ( implemented «Google brotli» — 01.10.2017 ):
Code:
cd /usr/share/nginx/modules
git clone https://github.com/google/ngx_brotli.git
cd ngx_brotli/
git submodule update --init --recursive
5. Here is a NEW part ( implemented «OpenSSL 1.1.1-dev» support, so that TLSv1.3 ciphers can be used — 01.10.2017 ):
Code:
cd /usr/share
git clone https://github.com/openssl/openssl.git
cd openssl
git checkout tls1.3-draft-18
./config shared enable-tls1_3 --prefix=/usr/share/openssl --openssldir=/usr/share/openssl -Wl,-rpath,'$(LIBRPATH)'
Last edited by a moderator: Oct 17, 2017
UFHH01
Guest
-
#2
6. Prepare your NGINX — compilation by using standard linux — folders and RSYNC them with your previous extractions:
Code:
cd /root/addons/nginx/nginx-1.13.6
mkdir -p /usr/share/nginx/modules/ngx_cache_purge-2.3
rsync -r /root/addons/nginx/nginx-1.13.6/ngx_cache_purge-2.3/* /usr/share/nginx/modules/ngx_cache_purge-2.3
mkdir -p /usr/share/nginx/modules/ngx_coolkit-0.2
rsync -r /root/addons/nginx/nginx-1.13.6/ngx_coolkit-0.2/* /usr/share/nginx/modules/ngx_coolkit-0.2
mkdir -p /usr/share/nginx/modules/ngx_slowfs_cache-1.10
rsync -r /root/addons/nginx/nginx-1.13.6/ngx_slowfs_cache-1.10/* /usr/share/nginx/modules/ngx_slowfs_cache-1.10
mkdir -p /usr/share/nginx/modules/ngx_headers-more-0.32
rsync -r /root/addons/nginx/nginx-1.13.6/ngx_headers-more-0.32/* /usr/share/nginx/modules/ngx_headers-more-0.32
mkdir -p /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable
rsync -r /root/addons/nginx/nginx-1.13.6/ngx_pagespeed-1.12.34.3-stable/* /usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable
7. As a final step, you would now edit your serverwide «/etc/nginx/nginx.conf» — configuration file and add/edit your own, unique global settings. I recommend at least these examples, to profit from your unique nginx — compilation:
For «brotli»:
Code:
brotli on;
brotli_static on;
brotli_types text/html text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/vnd.microsoft.icon image/bmp image/svg+xml;
brotli_comp_level 8;
For Google PageSpeed:
Code:
pagespeed on;
pagespeed LowercaseHtmlNames on;
pagespeed XHeaderValue "Powered by ngx_pagespeed and UF";
pagespeed StaticAssetPrefix /static/;
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed PreserveUrlRelativity on;
pagespeed EnableFilters combine_css,rewrite_css,move_css_above_scripts,combine_javascript,rewrite_javascript;
pagespeed EnableFilters lazyload_images,inline_preview_images,resize_mobile_images,inline_google_font_css,rewrite_style_attributes;
pagespeed EnableFilters prioritize_critical_css,make_google_analytics_async,outline_css,outline_javascript,move_css_to_head;
pagespeed EnableFilters include_js_source_maps,canonicalize_javascript_libraries,local_storage_cache,convert_to_webp_lossless,insert_image_dimensions;
pagespeed EnableFilters elide_attributes,extend_cache_pdfs,sprite_images,trim_urls,pedantic;
pagespeed EnableFilters remove_quotes,dedup_inlined_images,insert_dns_prefetch,remove_comments,collapse_whitespace;
pagespeed EnableFilters in_place_optimize_for_browser;
… and please don’t forget, to setup your NEW ciphers lists at «/etc/nginx/conf.d/ssl.conf» as for example:
Code:
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
ssl_ciphers 'TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
ssl_prefer_server_ciphers on;
ssl_ecdh_curve secp384r1;
( Pls. make as well a BACKUP for «nginx.conf» and «ssl.conf«, before AND after your manual changes, so that you don’t loose the new and old settings, in case of Plesk updates/upgrades/patches! )
8. You should now be able to COMPILE your NGINX — version, with the example command:
Code:
cd /root/addons/nginx/nginx-1.13.6
./configure --prefix=/etc/nginx
--sbin-path=/usr/sbin/nginx
--conf-path=/etc/nginx/nginx.conf
--error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--lock-path=/var/lock/nginx.lock
--pid-path=/var/run/nginx.pid
--http-client-body-temp-path=/var/lib/nginx/body
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi
--http-proxy-temp-path=/var/lib/nginx/proxy
--http-scgi-temp-path=/var/lib/nginx/scgi
--http-uwsgi-temp-path=/var/lib/nginx/uwsgi
--user=nginx
--group=nginx
--with-debug
--with-file-aio
--with-google_perftools_module
--with-mail
--with-mail_ssl_module
--with-threads
--with-select_module
--with-stream
--with-stream_ssl_module
--with-http_addition_module
--with-http_auth_request_module
--with-http_dav_module
--with-http_flv_module
--with-http_geoip_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_image_filter_module
--with-http_mp4_module
--with-http_perl_module
--with-http_random_index_module
--with-http_realip_module
--with-http_secure_link_module
--with-http_stub_status_module
--with-http_sub_module
--with-http_ssl_module
--with-http_v2_module
--with-http_xslt_module
--with-poll_module
--with-openssl=/usr/share/openssl
--with-openssl-opt=enable-tls1_3
--add-module=/usr/share/nginx/modules/ngx_brotli
--add-module=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.3-stable
--add-module=/usr/share/passenger/ngx_http_passenger_module
--add-module=/usr/share/nginx/modules/ngx_cache_purge-2.3
--add-module=/usr/share/nginx/modules/ngx_coolkit-0.2
--add-module=/usr/share/nginx/modules/ngx_slowfs_cache-1.10
--add-module=/usr/share/nginx/modules/ngx_headers-more-0.32
make
make install
Pls. INSPECT the output of your above commands, because in case of missing packages, or/and unresolved dependencies, it can be, that you have to install additional ( missing ) packages on your server!!!
Now that you compiled your new NGINX version, consider to use a «NGINX configuration test» with:
( You will now experience, that you already loaded the phusion passenger module, which makes the configuration file «/etc/nginx/modules.conf.d/phusion-passenger.conf» obsolete.
Pls. remove it with
Code:
rm /etc/nginx/modules.conf.d/phusion-passenger.conf
and repeat the «nginx -t» command! )
… and when you don’t experience issues/errors/problems, you can now restart your current NGINX service:
Pls. consider to setup the Plesk — package «sw-nginx» to «hold» in your software — package manager, in order to avoid automatic updates/upgrades/patches from Plesk for this package!
( Pls. see for informations and examples: => How to stop packages from being updated in Linux | Linuxaria )
Additional links, which might help you to find informations, solutions and discussions:
If you experience any issues/errors/problems, pls. don’t forget to include depending — log — files, add your operating system and consider to explain in detail, at which step of the «How-To» you experienced the issue/error/problem.
( updated: 17.10.2017 )
Last edited by a moderator: Oct 17, 2017
-
#3
Great job! Thank you @UFHH01 !
But unfortunately, Plesk update will kill it all completely
UFHH01
Guest
-
#4
Plesk update will kill it all completely
… not, when you setup «sw-nginx» on «hold«, as suggested. Works like a charm on several servers since years now.
Rar9
Regular Pleskian
-
#5
I had trouble with post 3
The downloads mv did cut & past
mv from /root/addons/nginx/ folder name
In addition in my install I needed to enable the passenger_module first.
Lastly PageSpeed needs to be enabled for given domain under plesk:
I used
pagespeed on;
# Needs to exist and be writable by nginx. Use tmpfs for best performance.
pagespeed FileCachePath /var/cache/ngx_pagespeed_cache;
pagespeed EnableFilters combine_css,combine_javascript,combine_heads,convert_meta_tags,recompress_images;
# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location ~ «.pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+» {
add_header «» «»;
}
location ~ «^/pagespeed_static/» { }
location ~ «^/ngx_pagespeed_beacon$» { }
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 1;
gzip_http_version 1.1;
gzip_min_length 10;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon application/vnd.ms-fontobject font/opentype application/x-font-ttf;
gzip_vary on;
gzip_proxied any; # Compression for all requests.
gzip_disable «msie6»;
location ~* .(?:ico|css|js|gif|jpg|jpeg|png)$ {
expires 30d;
add_header Pragma public;
add_header Cache-Control “public”;
try_files $uri @fallback;
}
-
#6
5. You should now be able to COMPILE your NGINX — version, with the example command:
Code:
cd /root/addons/nginx/nginx-1.11.7 ./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --user=nginx --group=nginx --with-debug --with-file-aio --with-google_perftools_module --with-ipv6 --with-mail --with-mail_ssl_module --with-threads --with-select_module --with-stream --with-stream_ssl_module --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_stub_status_module --with-http_sub_module --with-http_ssl_module --with-http_v2_module --with-http_xslt_module --with-poll_module --add-module=/usr/share/passenger/ngx_http_passenger_module --add-module=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.2-beta --add-module=/usr/share/nginx/modules/ngx_cache_purge-2.3 --add-module=/usr/share/nginx/modules/ngx_slowfs_cache-1.10 --add-module=/usr/share/nginx/modules/ngx_coolkit-0.2rc3 --add-module=/usr/share/nginx/modules/ngx_headers-more-0.32 make make install
Hi UFHH01,
I have found an error in the installation process in step 5, after compiled NGINX
The Error is:
You have set —with-debug for building nginx, but precompiled Debug binaries for
PSOL, which ngx_pagespeed depends on, aren’t available. If you’re trying to
debug PSOL you need to build it from source. If you just want to run nginx with
debug-level logging you can use the Release binaries.
Use the available Release binaries? [Y/n] y
mod_pagespeed_dir=/usr/share/nginx/modules/ngx_pagespeed-1.12.34.2-beta/psol/include
build_from_source=false
checking for psol … not found
./configure: error: module ngx_pagespeed requires the pagespeed optimization library.
Look in /root/addons/nginx/nginx-1.11.8/objs/autoconf.err for more details.
Can you help me please?
Thanks
UFHH01
Guest
-
#7
Hi bonny3,
pls. READ your ( possible ) error messages, in order to solve dependencies issues!
error: module ngx_pagespeed requires the pagespeed optimization library.
Look in /root/addons/nginx/nginx-1.11.8/objs/autoconf.err for more details.
checking for psol … not found
Due to the fact, that you seem very unexperienced with Linux ( otherwise you would have added at least your current operating system and the depending errors from «autoconf.err«, pls. consider to contact the Plesk Support ( => https://www.plesk.com/contact-us/support/#content-body ), or hire an experienced linux administrator to reach your desired goals.
-
#8
Hi bonny3,
pls. READ your ( possible ) error messages, in order to solve dependencies issues!
Due to the fact, that you seem very unexperienced with Linux ( otherwise you would have added at least your current operating system and the depending errors from «autoconf.err«, pls. consider to contact the Plesk Support ( => https://www.plesk.com/contact-us/support/#content-body ), or hire an experienced linux administrator to reach your desired goals.
I am not a guru, but what I have learned I have to learn alone.
this is a forum and ask for advice, but I see that you prefer to avoid.
Thanks Anyway
UFHH01
Guest
-
#9
Hi bonny3,
this is a forum and ask for advice, but I see that you prefer to avoid.
Sorry, but your conclusion is absolutely wrong, which is proven by the fact of my posts / likes and best answers in this forum. Your current linux knowledge and your server administration skills are just insufficient right now to reach the desired goal, if you are unable to solve the dependencies issue(s) — you even insist of discussing my answer, instead of providing necessary informations, so that possible solutions and work-arounds can’t be given, which leads again to my previous answer — sorry.
-
#10
Hi bonny3,
Sorry, but your conclusion is absolutely wrong, which is proven by the fact of my posts / likes and best answers in this forum. Your current linux knowledge and your server administration skills are just insufficient right now to reach the desired goal, if you are unable to solve the dependencies issue(s) — you even insist of discussing my answer, instead of providing necessary informations, so that possible solutions and work-arounds can’t be given, which leads again to my previous answer — sorry.
Hi UFHH01,
Thanks for your answer,
I have answered in this way because you told me to contact «Plesk Support or hire an experienced Linux administrator», if I had chosen that road would not be here to write in the forum and try to learn this world that interests me .
having said that, you can help me understand and fix my mistake please?
This is the my file autoconf.err
Thanks
Best Regards
Alessandro
-
autoconf.zip
2.9 KB
· Views: 28
-
#12
@bonny3 have you completed point 3 from @UFHH01 guide?
Hi Igor,
yes, I have completed… but don’t work… I send you screenshot my folder
Thanks
-
2017-01-20_094107.jpg
23.5 KB
· Views: 35
-
#13
pls. consider to contact the Plesk Support ( => https://www.plesk.com/contact-us/support/#content-body ), or hire an experienced linux administrator to reach your desired goals.
Hi,
Today I want to make a contribution to solving my problem I found when installing the module Nginx I hope will be of help to those who have had the same my error.
I not being an expert, as I said, I had to study the problem and realize that it was caused by an obsolete version of GCC, because centos 6.8 arrives at version 4.4.7. In this link you can find the solution of the problem
https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b
the gcc version, not updated with «yum update gcc-c ++» will need to download a new repo. I followed the explanations of the link https://gist.github.com/stephenturner/e3bc5cfacc2dc67eca8b and I managed to install the nginx_pagespeed module.
You have to upgrade this module to version gcc 4.8 for install nginx page_speed.
With centos 7 there should not be this problem.
I would have appreciated some help from this forum, but unfortunately, I was told to ask for help elsewhere..
Regards
-
#14
First of all, I strongly agree with bonny3.
UFHH01s approach really lacks information on the specific environment he used and in which he expects it to work (e. g. Linux version, compiler version,…). So, in turn, he expected more from you then he was willing to supply
However, professionally speaking this approach also sounds a bit more like a tinkered piece of handicraft for home use under a specific environment, then like anything to use in a real production environment, e.g. at a company. Sorry. How do you integrate automated updates on this? If only one of the source components (these are not only the six mentioned he mentioned at the beginning) gets one of these frequent itty bitty updates, you will have to go through the whole process again… — at least for security related updates this is without any alternatives… That enormously rises the total cost!
Also, for security reasons as well as for reliableness this should never be performed on a real live production server. Always prepare it as a whole on a development server, test it thoroughly, if possible put it to another test server, and then bring it to the production environment.
-
#15
At step 3 try mv v1.12.34.2-beta.tar.gz ngx_pagespeed-v1.12.34.2-beta.tar.gz
but have error
mv: cannot stat ‘v1.12.34.2-beta.tar.gz’: No such file or directory
UFHH01
Guest
-
#16
Hi viprus,
pls. make sure, that you actually DOWNLOADED the *.tar.gz: => https://github.com/pagespeed/ngx_pagespeed/archive/v1.12.34.2-beta.tar.gz . Your error — message states, that the file to move couldn’t be found on your server in the current directory.
Second, the archive provider changed the current name of this file to «ngx_pagespeed-1.12.34.2-beta.tar.gz» ( corrected/edited the tutorial above and updated it as well to the current NGINX — version «1.11.10» ).
Last edited by a moderator: Mar 10, 2017
-
#17
Hi viprus,
pls. make sure, that you actually DOWNLOADED the *.tar.gz: => https://github.com/pagespeed/ngx_pagespeed/archive/v1.12.34.2-beta.tar.gz . Your error — message states, that the file to move couldn’t be found on your server in the current directory.
Second, the archive provider changed the current name of this file to «ngx_pagespeed-1.12.34.2-beta.tar.gz» ( corrected/edited the tutorial above and updated it as well to the current NGINX — version «1.11.10» ).
Hi UFHH01,
thank you. I edit name v1.12.34.2-beta.tar.gz to ngx_pagespeed-1.12.34.2-beta.tar.gz and then OK.
But at step 4 cd /root/addons/nginx/nginx-1.11.10
I have that my folder nginx-1.11.10 already placed at /root/nginx-1.11.10 … can i continue like cd /root/nginx-1.11.10 ?
UFHH01
Guest
-
#18
Hi viprus,
the «cd» — command depends on your very own folder structure — pls. use the folder, where you extracted your current NGINX version on your system.
UFHH01
Guest
-
#19
The tutorial has been updated to the most recent versions and missing ( optional, but still needed! ) packages have been added — for Debian/Ubuntu AND CentOS/RHEL !
Last edited by a moderator: May 5, 2017
Rar9
Regular Pleskian
-
#20
With a few error correction of the above, I get all the way to MAKE install but this lat step give me a error that i´m unable to solve.
Code:
[email protected] ~/addons/nginx/nginx-1.13.0 # nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
[email protected] ~/addons/nginx/nginx-1.13.0 # make install
make -f objs/Makefile install
make[1]: Entering directory '/root/addons/nginx/nginx-1.13.0'
cd objs/src/http/modules/perl && make install
make[2]: Entering directory '/root/addons/nginx/nginx-1.13.0/objs/src/http/modules/perl'
Manifying 1 pod document
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/man/man3'
mkdir /usr/local/man: File exists at /usr/share/perl/5.22/ExtUtils/Install.pm line 477.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at -e line 1.
Makefile:794: recipe for target 'pure_site_install' failed
make[2]: *** [pure_site_install] Error 17
make[2]: Leaving directory '/root/addons/nginx/nginx-1.13.0/objs/src/http/modules/perl'
objs/Makefile:2290: recipe for target 'install_perl_modules' failed
make[1]: *** [install_perl_modules] Error 2
make[1]: Leaving directory '/root/addons/nginx/nginx-1.13.0'
Makefile:11: recipe for target 'install' failed
make: *** [install] Error 2
Доброе время суток!
Имеется VPS с Debian 6 и ISPManager. Хочу обновить nginx с текущей версии 0.7.67 до стабильной 1.0.11.
Скачиваю дистрибутив:
cd /temp/
wget http://nginx.org/download/nginx-1.0.11.tar.gz
tar zxf nginx-1.0.11.tar.gz
cd nginx-1.0.11
Конфигурирую:
./configure --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_dav_module --with-http_flv_module --with-http_gzip_static_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-ipv6 --with-mail --with-mail_ssl_modulechecking for OS
+ Linux 2.6.18-128.2.1.el5.028stab064.8 x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 4.4.5 (Debian 4.4.5-8)
checking for gcc -pipe switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for sched_setaffinity() ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... not found
checking for nogroup group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for SO_SETFIB ... not found
checking for SO_ACCEPTFILTER ... not found
checking for TCP_DEFER_ACCEPT ... found
checking for accept4() ... found
checking for int size ... 4 bytes
checking for long size ... 8 bytes
checking for long long size ... 8 bytes
checking for void * size ... 8 bytes
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system endianess ... little endianess
checking for size_t size ... 8 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 8 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for PCRE library ... found
checking for OpenSSL library ... found
checking for zlib library ... found
creating objs/MakefileConfiguration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib librarynginx path prefix: "/etc/nginx"
nginx binary file: "/etc/nginx/sbin/nginx"
nginx configuration prefix: "/etc/nginx"
nginx configuration file: "/etc/nginx/nginx.conf"
nginx pid file: "/var/run/nginx.pid"
nginx error log file: "/var/log/nginx/error.log"
nginx http access log file: "/var/log/nginx/access.log"
nginx http client request body temporary files: "/var/lib/nginx/body"
nginx http proxy temporary files: "/var/lib/nginx/proxy"
nginx http fastcgi temporary files: "/var/lib/nginx/fastcgi"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
Делаю make:
...
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/mail
-o objs/src/mail/ngx_mail_auth_http_module.o
src/mail/ngx_mail_auth_http_module.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/mail
-o objs/src/mail/ngx_mail_proxy_module.o
src/mail/ngx_mail_proxy_module.c
gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs
-o objs/ngx_modules.o
objs/ngx_modules.c
gcc -o objs/nginx
objs/src/core/nginx.o
objs/src/core/ngx_log.o
objs/src/core/ngx_palloc.o
...
objs/src/mail/ngx_mail_proxy_module.o
objs/ngx_modules.o
-lpthread -lcrypt -lpcre -lssl -lcrypto -ldl -lz
make[1]: Leaving directory `/tmp/nginx-1.0.11'
make -f objs/Makefile manpage
make[1]: Entering directory `/tmp/nginx-1.0.11'
sed -e "s|%%PREFIX%%|/etc/nginx|"
-e "s|%%PID_PATH%%|/var/run/nginx.pid|"
-e "s|%%CONF_PATH%%|/etc/nginx/nginx.conf|"
-e "s|%%ERROR_LOG_PATH%%|/var/log/nginx/error.log|"
< man/nginx.8 > objs/nginx.8
make[1]: Leaving directory `/tmp/nginx-1.0.11'
Затем останавливаю nginx (/etc/init.d/nginx stop) и делаю make install:
# make install
make -f objs/Makefile install
make[1]: Entering directory `/tmp/nginx-1.0.11'
test -d '/etc/nginx' || mkdir -p '/etc/nginx'
test -d '/etc/nginx/sbin' || mkdir -p '/etc/nginx/sbin'
test ! -f '/etc/nginx/sbin/nginx' || mv '/etc/nginx/sbin/nginx' '/etc/nginx/sbin/nginx.old'
cp objs/nginx '/etc/nginx/sbin/nginx'
test -d '/etc/nginx' || mkdir -p '/etc/nginx'
cp conf/koi-win '/etc/nginx'
cp conf/koi-utf '/etc/nginx'
cp conf/win-utf '/etc/nginx'
test -f '/etc/nginx/mime.types' || cp conf/mime.types '/etc/nginx'
cp conf/mime.types '/etc/nginx/mime.types.default'
test -f '/etc/nginx/fastcgi_params' || cp conf/fastcgi_params '/etc/nginx'
cp conf/fastcgi_params '/etc/nginx/fastcgi_params.default'
test -f '/etc/nginx/fastcgi.conf' || cp conf/fastcgi.conf '/etc/nginx'
cp conf/fastcgi.conf '/etc/nginx/fastcgi.conf.default'
test -f '/etc/nginx/uwsgi_params' || cp conf/uwsgi_params '/etc/nginx'
cp conf/uwsgi_params '/etc/nginx/uwsgi_params.default'
test -f '/etc/nginx/scgi_params' || cp conf/scgi_params '/etc/nginx'
cp conf/scgi_params '/etc/nginx/scgi_params.default'
test -f '/etc/nginx/nginx.conf' || cp conf/nginx.conf '/etc/nginx/nginx.conf'
cp conf/nginx.conf '/etc/nginx/nginx.conf.default'
test -d '/var/run' || mkdir -p '/var/run'
test -d '/var/log/nginx' || mkdir -p '/var/log/nginx'
test -d '/etc/nginx/html' || cp -R html '/etc/nginx'
test -d '/var/log/nginx' || mkdir -p '/var/log/nginx'
make[1]: Leaving directory `/tmp/nginx-1.0.11'
#
Как видно, nginx не установился.
Собственно, вопрос — что не так и как исправить?