google / ngx_brotli

NGINX module for Brotli compression

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cannot find -lbrotlienc

hyperpogz opened this issue · comments

I've encountered this issue when my docker is running this command in my Dockerfile

ENV NGINX_VERSION 1.14.2
RUN wget -P /tmp http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \
	tar --directory=/tmp -zxvf /tmp/nginx-${NGINX_VERSION}.tar.gz && \
	cd /tmp/nginx-${NGINX_VERSION} && \
	./configure \
		--add-module=/usr/lib/nginx/modules/ngx_brotli \
		--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/run/nginx.lock \
		--modules-path=/usr/lib/nginx/modules \
		--pid-path=/var/run/nginx.pid \
		--prefix=/etc/nginx \
		--sbin-path=/usr/sbin/nginx \
		--with-debug \
		--with-http_gzip_static_module \
		--with-http_stub_status_module && \
	make && make install

And this is the error logs

#0 17.72 	-o objs/ngx_modules.o \
#0 17.72 	objs/ngx_modules.c
#0 17.75 cc -o objs/nginx \
#0 17.75 objs/src/core/nginx.o \
#0 17.75 objs/src/core/ngx_log.o \
#0 17.75 objs/src/core/ngx_palloc.o \
#0 17.75 objs/src/core/ngx_array.o \
#0 17.75 objs/src/core/ngx_list.o \
#0 17.75 objs/src/core/ngx_hash.o \
#0 17.75 objs/src/core/ngx_buf.o \
#0 17.75 objs/src/core/ngx_queue.o \
#0 17.75 objs/src/core/ngx_output_chain.o \
#0 17.75 objs/src/core/ngx_string.o \
#0 17.75 objs/src/core/ngx_parse.o \
#0 17.75 objs/src/core/ngx_parse_time.o \
#0 17.75 objs/src/core/ngx_inet.o \
#0 17.75 objs/src/core/ngx_file.o \
#0 17.75 objs/src/core/ngx_crc32.o \
#0 17.75 objs/src/core/ngx_murmurhash.o \
#0 17.75 objs/src/core/ngx_md5.o \
#0 17.75 objs/src/core/ngx_sha1.o \
#0 17.75 objs/src/core/ngx_rbtree.o \
#0 17.75 objs/src/core/ngx_radix_tree.o \
#0 17.75 objs/src/core/ngx_slab.o \
#0 17.75 objs/src/core/ngx_times.o \
#0 17.75 objs/src/core/ngx_shmtx.o \
#0 17.75 objs/src/core/ngx_connection.o \
#0 17.75 objs/src/core/ngx_cycle.o \
#0 17.75 objs/src/core/ngx_spinlock.o \
#0 17.75 objs/src/core/ngx_rwlock.o \
#0 17.75 objs/src/core/ngx_cpuinfo.o \
#0 17.75 objs/src/core/ngx_conf_file.o \
#0 17.75 objs/src/core/ngx_module.o \
#0 17.75 objs/src/core/ngx_resolver.o \
#0 17.75 objs/src/core/ngx_open_file_cache.o \
#0 17.75 objs/src/core/ngx_crypt.o \
#0 17.75 objs/src/core/ngx_proxy_protocol.o \
#0 17.75 objs/src/core/ngx_syslog.o \
#0 17.75 objs/src/event/ngx_event.o \
#0 17.75 objs/src/event/ngx_event_timer.o \
#0 17.75 objs/src/event/ngx_event_posted.o \
#0 17.75 objs/src/event/ngx_event_accept.o \
#0 17.75 objs/src/event/ngx_event_connect.o \
#0 17.75 objs/src/event/ngx_event_pipe.o \
#0 17.75 objs/src/os/unix/ngx_time.o \
#0 17.75 objs/src/os/unix/ngx_errno.o \
#0 17.75 objs/src/os/unix/ngx_alloc.o \
#0 17.75 objs/src/os/unix/ngx_files.o \
#0 17.75 objs/src/os/unix/ngx_socket.o \
#0 17.75 objs/src/os/unix/ngx_recv.o \
#0 17.75 objs/src/os/unix/ngx_readv_chain.o \
#0 17.75 objs/src/os/unix/ngx_udp_recv.o \
#0 17.75 objs/src/os/unix/ngx_send.o \
#0 17.75 objs/src/os/unix/ngx_writev_chain.o \
#0 17.75 objs/src/os/unix/ngx_udp_send.o \
#0 17.75 objs/src/os/unix/ngx_udp_sendmsg_chain.o \
#0 17.75 objs/src/os/unix/ngx_channel.o \
#0 17.75 objs/src/os/unix/ngx_shmem.o \
#0 17.75 objs/src/os/unix/ngx_process.o \
#0 17.75 objs/src/os/unix/ngx_daemon.o \
#0 17.75 objs/src/os/unix/ngx_setaffinity.o \
#0 17.75 objs/src/os/unix/ngx_setproctitle.o \
#0 17.75 objs/src/os/unix/ngx_posix_init.o \
#0 17.75 objs/src/os/unix/ngx_user.o \
#0 17.75 objs/src/os/unix/ngx_dlopen.o \
#0 17.75 objs/src/os/unix/ngx_process_cycle.o \
#0 17.75 objs/src/os/unix/ngx_linux_init.o \
#0 17.75 objs/src/event/modules/ngx_epoll_module.o \
#0 17.75 objs/src/os/unix/ngx_linux_sendfile_chain.o \
#0 17.75 objs/src/core/ngx_regex.o \
#0 17.75 objs/src/http/ngx_http.o \
#0 17.75 objs/src/http/ngx_http_core_module.o \
#0 17.75 objs/src/http/ngx_http_special_response.o \
#0 17.75 objs/src/http/ngx_http_request.o \
#0 17.75 objs/src/http/ngx_http_parse.o \
#0 17.75 objs/src/http/modules/ngx_http_log_module.o \
#0 17.75 objs/src/http/ngx_http_request_body.o \
#0 17.75 objs/src/http/ngx_http_variables.o \
#0 17.75 objs/src/http/ngx_http_script.o \
#0 17.75 objs/src/http/ngx_http_upstream.o \
#0 17.75 objs/src/http/ngx_http_upstream_round_robin.o \
#0 17.75 objs/src/http/ngx_http_file_cache.o \
#0 17.75 objs/src/http/ngx_http_write_filter_module.o \
#0 17.75 objs/src/http/ngx_http_header_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_chunked_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_range_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_gzip_filter_module.o \
#0 17.75 objs/src/http/ngx_http_postpone_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_ssi_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_charset_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_userid_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_headers_filter_module.o \
#0 17.75 objs/src/http/ngx_http_copy_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_not_modified_filter_module.o \
#0 17.75 objs/src/http/modules/ngx_http_static_module.o \
#0 17.75 objs/src/http/modules/ngx_http_gzip_static_module.o \
#0 17.75 objs/src/http/modules/ngx_http_autoindex_module.o \
#0 17.75 objs/src/http/modules/ngx_http_index_module.o \
#0 17.75 objs/src/http/modules/ngx_http_mirror_module.o \
#0 17.75 objs/src/http/modules/ngx_http_try_files_module.o \
#0 17.75 objs/src/http/modules/ngx_http_auth_basic_module.o \
#0 17.75 objs/src/http/modules/ngx_http_access_module.o \
#0 17.75 objs/src/http/modules/ngx_http_limit_conn_module.o \
#0 17.75 objs/src/http/modules/ngx_http_limit_req_module.o \
#0 17.75 objs/src/http/modules/ngx_http_geo_module.o \
#0 17.75 objs/src/http/modules/ngx_http_map_module.o \
#0 17.75 objs/src/http/modules/ngx_http_split_clients_module.o \
#0 17.75 objs/src/http/modules/ngx_http_referer_module.o \
#0 17.75 objs/src/http/modules/ngx_http_rewrite_module.o \
#0 17.75 objs/src/http/modules/ngx_http_proxy_module.o \
#0 17.75 objs/src/http/modules/ngx_http_fastcgi_module.o \
#0 17.75 objs/src/http/modules/ngx_http_uwsgi_module.o \
#0 17.75 objs/src/http/modules/ngx_http_scgi_module.o \
#0 17.75 objs/src/http/modules/ngx_http_memcached_module.o \
#0 17.75 objs/src/http/modules/ngx_http_empty_gif_module.o \
#0 17.75 objs/src/http/modules/ngx_http_browser_module.o \
#0 17.75 objs/src/http/modules/ngx_http_upstream_hash_module.o \
#0 17.75 objs/src/http/modules/ngx_http_upstream_ip_hash_module.o \
#0 17.75 objs/src/http/modules/ngx_http_upstream_least_conn_module.o \
#0 17.75 objs/src/http/modules/ngx_http_upstream_keepalive_module.o \
#0 17.75 objs/src/http/modules/ngx_http_upstream_zone_module.o \
#0 17.75 objs/src/http/modules/ngx_http_stub_status_module.o \
#0 17.75 objs/addon/filter/ngx_http_brotli_filter_module.o \
#0 17.75 objs/addon/static/ngx_http_brotli_static_module.o \
#0 17.75 objs/ngx_modules.o \
#0 17.75 -ldl -lpthread -lcrypt -lbrotlienc -lm -lpcre -lz \
#0 17.75 -Wl,-E
#0 17.77 /usr/bin/ld: cannot find -lbrotlienc
#0 17.77 collect2: error: ld returned 1 exit status
#0 17.77 make[1]: *** [objs/nginx] Error 1
#0 17.77 objs/Makefile:235: recipe for target 'objs/nginx' failed
#0 17.77 make[1]: Leaving directory '/tmp/nginx-1.14.2'
#0 17.77 make: *** [build] Error 2
#0 17.77 Makefile:8: recipe for target 'build' failed

ERROR: failed to solve: process "/bin/sh -c wget -P /tmp http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz && \ttar --directory=/tmp -zxvf /tmp/nginx-${NGINX_VERSION}.tar.gz && \tcd /tmp/nginx-${NGINX_VERSION} && \t./configure \t\t--add-module=/usr/lib/nginx/modules/ngx_brotli \t\t--conf-path=/etc/nginx/nginx.conf \t\t--error-log-path=/var/log/nginx/error.log \t\t--http-log-path=/var/log/nginx/access.log \t\t--lock-path=/var/run/nginx.lock \t\t--modules-path=/usr/lib/nginx/modules \t\t--pid-path=/var/run/nginx.pid \t\t--prefix=/etc/nginx \t\t--sbin-path=/usr/sbin/nginx \t\t--with-debug \t\t--with-http_gzip_static_module \t\t--with-http_stub_status_module && \tmake && make install" did not complete successfully: exit code: 2
ERROR: Service 'nginx' failed to build : Build failed

I'm using Ubuntu 20.04. Does anyone have any idea on how to fix this?

commented

If releases could be tagged, that would be great
https://github.com/google/ngx_brotli/releases