Unable to install Brotli with NginX

0

Hi, I think the new Brotli version breaks the makefile configure settings. I run the following command to install Brotli on my webserver.

cd /tmp

sudo dnf install git pcre-devel -y

curl -LO http://nginx.org/download/nginx-1.25.2.tar.gz tar xzvf nginx-1.25.2.tar.gz cd nginx-1.25.2 sudo git clone https://github.com/google/ngx_brotli --recursive --branch 1.0.9 sudo ./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli

sudo make modules

I get this error instead:

cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules
-o objs/addon/filter/ngx_http_brotli_filter_module.o
/tmp/nginx-1.25.2/ngx_brotli/filter/ngx_http_brotli_filter_module.c cc -c -fPIC -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -Wno-deprecated-declarations -I src/core -I src/event -I src/event/modules -I src/event/quic -I src/os/unix -I /tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/include -I objs -I src/http -I src/http/modules
-o objs/ngx_http_brotli_filter_module_modules.o
objs/ngx_http_brotli_filter_module_modules.c cc -o objs/ngx_http_brotli_filter_module.so
objs/addon/filter/ngx_http_brotli_filter_module.o
objs/ngx_http_brotli_filter_module_modules.o
-L/tmp/nginx-1.25.2/ngx_brotli/deps/brotli/c/../out -lbrotlienc -lbrotlicommon -lm
-shared /usr/bin/ld: cannot find -lbrotlienc: No such file or directory /usr/bin/ld: cannot find -lbrotlicommon: No such file or directory collect2: error: ld returned 1 exit status make[1]: *** [objs/Makefile:1219: objs/ngx_http_brotli_filter_module.so] Error 1 make[1]: Leaving directory '/tmp/nginx-1.25.2' make: *** [Makefile:16: modules] Error 2

This worked with Brotli 1.0.9

Thanks!

gefragt vor 8 Monaten649 Aufrufe
1 Antwort
0
Akzeptierte Antwort

This command worked, be sure to be in root first running it.

git clone --recurse-submodules -j8 https://github.com/google/ngx_brotli cd ngx_brotli/deps/brotli mkdir out && cd out cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_CXX_FLAGS="-Ofast -m64 -march=native -mtune=native -flto -funroll-loops -ffunction-sections -fdata-sections -Wl,--gc-sections" -DCMAKE_INSTALL_PREFIX=./installed .. cmake --build . --config Release --target brotlienc cd ../../../..

./configure --with-compat --add-dynamic-module=/tmp/nginx-1.25.2/ngx_brotli make modules

Thanks!

beantwortet vor 8 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen