首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >从源开始的Pagespeed + Nginx安装失败

从源开始的Pagespeed + Nginx安装失败
EN

Unix & Linux用户
提问于 2016-12-08 16:52:45
回答 1查看 740关注 0票数 1

我试图在Ubuntu14.04中用Nginx编译PagesedwithNbuntu14.04,并遵循Google的指示,发现了一些我不太理解的错误。默认情况下,它将找不到我的OpenSSL位置,所以我手动输入它。然而,它仍然失败。

我做错了什么?

以下是整个过程:

代码语言:javascript
复制
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.
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2016-12-19 16:09:33

我试图手动强制它检查/usr/bin/openssl,因为这是wich openssl瞄准openssl的地方,但是什么都没有发生,而且它拒绝了后续安装。

搜索后,我被告知要安装libssl-dev。这解决了我的问题。

这样,安装工作就会顺利进行。

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/329012

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档