|
本帖最后由 anuny 于 2022-8-27 19:20 编辑
ubuntu编译Padavan的nginx,编译配置开启openssl和rewrite支持后会编译失败,不开启能编译成功,请问有大神知道怎么编译吗?
ubuntu已经安装了openssl的,但是编译会报错
- checking for OpenSSL library … not found
- checking for OpenSSL library in /usr/local/ … not found
- checking for OpenSSL library in /usr/pkg/ … not found
- checking for OpenSSL library in /opt/local/ … not found
- ./configure: error: SSL modules require the OpenSSL library.
- You can either do not enable the modules, or install the OpenSSL library
- into the system, or build the OpenSSL library statically from the source
- with nginx by using --with-openssl= option.
复制代码
/opt/rt-n56u/trunk/user/nginx/Makefile
- THISDIR=$(shell pwd)
- PPPD_DIR=$(ROOTDIR)/user/nginx
- CFLAGS += -O2
- CFLAGS += -ffunction-sections -fdata-sections
- LDFLAGS += -Wl,--gc-sections
- SRC_VER = 1.20.2
- SRC_NAME = nginx-$(SRC_VER)
- SRC_FILE = $(SRC_NAME).tar.gz
- SRC_URL := http://nginx.org/download/$(SRC_FILE)
- all: download_test extra_test config_test
- $(MAKE) -C $(SRC_NAME)
- download_test:
- ( if [ ! -f $(SRC_NAME).tar.gz ]; then \
- wget -t5 --timeout=20 --no-check-certificate -O $(SRC_FILE) $(SRC_URL); \
- fi )
- extra_test:
- ( if [ ! -d $(SRC_NAME) ]; then \
- tar xf $(SRC_FILE); \
- sed -i 's/if \/bin\/sh/if \(echo march \| grep march\) \|\| \/bin\/sh/' $(SRC_NAME)/auto/feature ; \
- sed -i 's/if \[ -x/if \(echo march \| grep march\)\; then ngx_size=4; elif \[ -x/' $(SRC_NAME)/auto/types/sizeof ; \
- fi )
- config_test:
- ( if [ -f ./config_done ]; then \
- echo "the same configuration"; \
- else \
- make configure && touch config_done; \
- fi )
- configure:
- ( cd $(SRC_NAME) ; \
- ./configure \
- --sbin-path=/usr/sbin/nginx \
- --prefix=/tmp/nginx \
- --conf-path=/etc/storage/nginx/nginx.conf \
- --pid-path=/var/run/nginx.pid \
- --error-log-path=/tmp/nginx/error.log \
- --http-log-path=/tmp/nginx/access.log \
- --with-http_ssl_module \
- --with-openssl \
- --without-http_rewrite_module \
- --without-http_gzip_module \
- --with-stream ; \
- )
- clean:
- if [ -f $(SRC_NAME)/Makefile ] ; then \
- $(MAKE) -C $(SRC_NAME) distclean ; \
- fi ; \
- rm -f config_done
- romfs:
- $(ROMFSINST) $(THISDIR)/$(SRC_NAME)/objs/nginx /usr/sbin/nginx
- $(ROMFSINST) -p +x /usr/bin/nginx.sh
复制代码
|
|