通过源码编译安装会遇到openssl类库找不到的问题,不解决了,太麻烦,直接用brew安装。
之前的错误:
bogon:Nginx-1.10.1 liyue$ sudo ./configure --prefix=/usr/local/Nginx --with-http_ssl_module --with-cc-opt="-Wno-deprecated-declarations" --with-openssl=/usr/bin/
checking for OS
+ Darwin 15.6.0 x86_64
checking for C compiler ... found
+ using Clang C compiler
+ clang version: 7.3.0 (clang-703.0.29)
checking for -Wl,-E switch ... not 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 ... found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... not found
checking for Darwin specific features
+ kqueue found
checking for kqueue's EVFILT_TIMER ... found
checking for Darwin 64-bit kqueue millisecond timeout bug ... not found
checking for sendfile() ... found
checking for atomic(3) ... found
checking for nobody group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for crypt() ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... not found
checking for O_DIRECT ... not found
checking for F_NOCACHE ... found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... 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 IP_RECVDSTADDR ... found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... not found
checking for TCP_DEFER_ACCEPT ... not found
checking for TCP_KEEPIDLE ... not found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... not found
checking for accept4() ... not found
checking for eventfd() ... not found
checking for eventfd() (SYS_eventfd) ... not 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 setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... not found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for posix_memalign() ... found
checking for memalign() ... not found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero",MAP_SHARED) ... found but is not working
checking for System V shared memory ... found
checking for POSIX semaphores ... found but is not working
checking for POSIX semaphores in libpthread ... found but is not working
checking for POSIX semaphores in librt ... not 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 ... found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for openat(),fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... 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/
- md5: using OpenSSL library
- sha1: using OpenSSL library
- 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"
bogon:Nginx-1.10.1 liyue$ sudo make
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f objs/Makefile
cd /usr/bin/ \
&& if [ -f Makefile ]; then /Applications/Xcode.app/Contents/Developer/usr/bin/make clean; fi \
&& ./config --prefix=/usr/bin//.openssl no-shared \
&& /Applications/Xcode.app/Contents/Developer/usr/bin/make \
&& /Applications/Xcode.app/Contents/Developer/usr/bin/make install_sw LIBDIR=lib
/bin/sh: ./config: No such file or directory
make[1]: [/usr/bin//.openssl/include/openssl/ssl.h] Error 127
make: [build] Error 2
bogon:Nginx-1.10.1 liyue$ brew search Nginx
Nginx
homebrew/Nginx/accept-language-Nginx-module homebrew/Nginx/mogilefs-Nginx-module
homebrew/Nginx/accesskey-Nginx-module homebrew/Nginx/mp4-h264-Nginx-module
homebrew/Nginx/ajp-Nginx-module homebrew/Nginx/mruby-Nginx-module
homebrew/Nginx/anti-ddos-Nginx-module homebrew/Nginx/naxsi-Nginx-module
homebrew/Nginx/array-var-Nginx-module homebrew/Nginx/nchan-Nginx-module
homebrew/Nginx/auth-digest-Nginx-module homebrew/Nginx/Nginx-full
homebrew/Nginx/auth-ldap-Nginx-module homebrew/Nginx/notice-Nginx-module
homebrew/Nginx/auth-pam-Nginx-module homebrew/Nginx/PHP-session-Nginx-module
homebrew/Nginx/auto-keepalive-Nginx-module homebrew/Nginx/push-stream-Nginx-module
homebrew/Nginx/autols-Nginx-module homebrew/Nginx/realtime-req-Nginx-module
homebrew/Nginx/cache-purge-Nginx-module homebrew/Nginx/redis-Nginx-module
homebrew/Nginx/captcha-Nginx-module homebrew/Nginx/redis2-Nginx-module
homebrew/Nginx/counter-zone-Nginx-module homebrew/Nginx/rtmp-Nginx-module
homebrew/Nginx/ctpp2-Nginx-module homebrew/Nginx/set-misc-Nginx-module
homebrew/Nginx/dav-ext-Nginx-module homebrew/Nginx/small-light-Nginx-module
homebrew/Nginx/dosdetector-Nginx-module homebrew/Nginx/stream-lua-Nginx-module
homebrew/Nginx/echo-Nginx-module homebrew/Nginx/subs-filter-Nginx-module
homebrew/Nginx/eval-Nginx-module homebrew/Nginx/tcp-proxy-Nginx-module
homebrew/Nginx/extended-status-Nginx-module homebrew/Nginx/txid-Nginx-module
homebrew/Nginx/fancyindex-Nginx-module homebrew/Nginx/unzip-Nginx-module
homebrew/Nginx/geoip2-Nginx-module homebrew/Nginx/upload-Nginx-module
homebrew/Nginx/headers-more-Nginx-module homebrew/Nginx/upload-progress-Nginx-module
homebrew/Nginx/healthcheck-Nginx-module homebrew/Nginx/upstream-order-Nginx-module
homebrew/Nginx/http-accounting-Nginx-module homebrew/Nginx/ustats-Nginx-module
homebrew/Nginx/http-flood-detector-Nginx-module homebrew/Nginx/var-req-speed-Nginx-module
homebrew/Nginx/http-remote-passwd-Nginx-module homebrew/Nginx/vod-Nginx-module
homebrew/Nginx/log-if-Nginx-module homebrew/Nginx/websockify-Nginx-module
homebrew/Nginx/lua-Nginx-module homebrew/Nginx/xsltproc-Nginx-module
homebrew/Nginx/mod-zip-Nginx-module
bogon:Nginx-1.10.1 liyue$ brew install Nginx
==> Downloading https://homebrew.bintray.com/bottles/Nginx-1.10.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring Nginx-1.10.1.el_capitan.bottle.tar.gz
==> Caveats
Docroot is: /usr/local/var/www
The default port has been set in /usr/local/etc/Nginx/Nginx.conf to 8080 so that
Nginx can run without sudo.
Nginx will load all files in /usr/local/etc/Nginx/servers/.
To have launchd start Nginx Now and restart at login:
brew services start Nginx
Or,if you don't want/need a background service you can just run:
Nginx
==> Summary
? /usr/local/Cellar/Nginx/1.10.1: 7 files,972.2K
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。