Ubuntu 14.04では、Nginxを使用してPagespeedをコンパイルするためにGoogleの指示に従おうとすると、よく理解できないいくつかのエラーが発生しました。デフォルトではOpenSSLの場所が見つからないため、手動で入力します。しかし、まだ失敗しました。
私は何が間違っていましたか?
全体のプロセスは次のとおりです。
alain@a3:~$ bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
> --nginx-version latest
Detected debian-based distro.
Operating system dependencies are all set.
Downloading ngx_pagespeed...
--2016-12-08 10:43:19-- https://github.com/pagespeed/ngx_pagespeed/archive/latest-stable.zip
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://codeload.github.com/pagespeed/ngx_pagespeed/zip/latest-stable [following]
--2016-12-08 10:43:19-- https://codeload.github.com/pagespeed/ngx_pagespeed/zip/latest-stable
Resolving codeload.github.com (codeload.github.com)... 192.30.253.120, 192.30.253.121
Connecting to codeload.github.com (codeload.github.com)|192.30.253.120|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 135997 (133K) [application/zip]
Saving to: ‘/tmp/tmp.AUd44ktCew/ngx_pagespeed-latest-stable.zip’
/tmp/tmp.AUd44ktCew/ngx_pagespeed-latest-stable 100%[======================================================================================================>] 132.81K 682KB/s in 0.2s
2016-12-08 10:43:20 (682 KB/s) - ‘/tmp/tmp.AUd44ktCew/ngx_pagespeed-latest-stable.zip’ saved [135997/135997]
OK to delete /home/alain/ngx_pagespeed-latest-stable? [Y/n]
Extracting ngx_pagespeed...
Downloading PSOL binary...
--2016-12-08 10:43:22-- https://dl.google.com/dl/page-speed/psol/1.11.33.4.tar.gz
Resolving dl.google.com (dl.google.com)... 216.58.217.238, 2607:f8b0:4002:805::200e
Connecting to dl.google.com (dl.google.com)|216.58.217.238|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 132774363 (127M) [application/x-tar]
Saving to: ‘1.11.33.4.tar.gz’
1.11.33.4.tar.gz 100%[======================================================================================================>] 126.62M 31.7MB/s in 4.4s
2016-12-08 10:43:26 (29.0 MB/s) - ‘1.11.33.4.tar.gz’ saved [132774363/132774363]
Extracting PSOL...
Downloading nginx...
--2016-12-08 10:43:33-- http://nginx.org/download/nginx-1.11.6.tar.gz
Resolving nginx.org (nginx.org)... 95.211.80.227, 206.251.255.63, 2606:7100:1:69::3f, ...
Connecting to nginx.org (nginx.org)|95.211.80.227|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 960331 (938K) [application/octet-stream]
Saving to: ‘/tmp/tmp.AUd44ktCew/nginx-1.11.6.tar.gz’
/tmp/tmp.AUd44ktCew/nginx-1.11.6.tar.gz 100%[======================================================================================================>] 937.82K 62.9KB/s in 7.5s
2016-12-08 10:43:41 (125 KB/s) - ‘/tmp/tmp.AUd44ktCew/nginx-1.11.6.tar.gz’ saved [960331/960331]
OK to delete /home/alain/nginx-1.11.6/? [Y/n]
Extracting nginx...
About to build nginx. Do you have any additional ./configure
arguments you would like to set? For example, if you would like
to build nginx with https support give --with-http_ssl_module
If you don't have any, just press enter.
> --with-http_ssl_module --with-openssl=/usr/bin/openssl
About to configure nginx with:
./configure --add-module=/home/alain/ngx_pagespeed-latest-stable --with-http_ssl_module --with-openssl=/usr/bin/openssl
Does this look right? [Y/n]
checking for OS
+ Linux 4.4.0-53-generic x86_64
checking for C compiler ... found
+ using GNU C compiler
+ gcc version: 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... 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 EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... not found
checking for O_PATH ... 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_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... 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 uint32_t ... found
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 byte ordering ... little endian
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 pwritev() ... 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 sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
configuring additional modules
adding module in /home/alain/ngx_pagespeed-latest-stable
mod_pagespeed_dir=/home/alain/ngx_pagespeed-latest-stable/psol/include
build_from_source=false
checking for psol ... found
List of modules (in reverse order of applicability): ngx_http_write_filter_module ngx_http_header_filter_module ngx_http_chunked_filter_module ngx_http_range_header_filter_module ngx_pagespeed_etag_filter ngx_http_gzip_filter_module ngx_pagespeed ngx_http_postpone_filter_module ngx_http_ssi_filter_module ngx_http_charset_filter_module ngx_http_userid_filter_module ngx_http_headers_filter_module
checking for psol-compiler-compat ... found
+ ngx_pagespeed was configured
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for zlib library ... found
creating objs/Makefile
Configuration summary
+ using system PCRE library
+ using OpenSSL library: /usr/bin/openssl
+ using system zlib library
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
Build nginx? [Y/n]
make -f objs/Makefile
make[1]: Entering directory '/home/alain/nginx-1.11.6'
cd /usr/bin/openssl \
&& if [ -f Makefile ]; then make clean; fi \
&& ./config --prefix=/usr/bin/openssl/.openssl no-shared \
&& make \
&& make install_sw LIBDIR=lib
/bin/sh: 1: cd: can't cd to /usr/bin/openssl
objs/Makefile:1339: recipe for target '/usr/bin/openssl/.openssl/include/openssl/ssl.h' failed
make[1]: *** [/usr/bin/openssl/.openssl/include/openssl/ssl.h] Error 2
make[1]: Leaving directory '/home/alain/nginx-1.11.6'
Makefile:8: recipe for target 'build' failed
make: *** [build] Error 2
Error: Failure running 'make', exiting.
答え1
/usr/bin/openssl
opensslがある場所なので、手動で強制的に確認しようとしましたが、wich openssl
何も起こらず、その後のインストールが拒否されました。
検索してみるとインストールしろと出ましたねlibssl-dev
。これは私の問題を解決しました。
これにより、インストールがスムーズに行われます。