@JohnDidact
Нуб во всём

Как собрать nginx с zlib и libressl на Almalinux 9?

Дело это всё делаю впервые, с linux познакомился буквально 2 недели назад, тогда же и взял VPS. Поэтому, вопрос может показаться глупым. Гуглил весь день, что только не читал... В общем:

Привилегированный пользователь. Almalinux 9. Работаю в Windows CMD по SSH (по ключу, без пароля, на нестандартном порту ssh, всё как положено)
Пытаюсь собрать из исходников Nginx 1.26.1, так как хочу http3. Установил пакеты automake, autoconf, git, libtool, perl, wget, tar, скачал исходники nginx, libressl, zlib, pcre2, распаковал всё это дело, зашёл в директорию распакованного nginx, подготавливаю сборку:
sudo ./configure --prefix=/home/user/webserver \
--without-quic_bpf_module \
--with-threads \
--with-file-aio \
--with-http_ssl_module \
--with-http_v2_module \
--with-http_v3_module \
--with-http_realip_module \
--with-http_addition_module \
--with-http_sub_module \
--with-http_dav_module \
--with-http_flv_module \
--with-http_mp4_module \
--with-http_gunzip_module \
--with-http_gzip_static_module \
--with-http_auth_request_module \
--with-http_random_index_module \
--with-http_secure_link_module \
--with-http_slice_module \
--with-http_stub_status_module \
--with-http_perl_module \
--with-mail \
--with-mail_ssl_module \
--with-stream \
--with-stream_ssl_module \
--with-stream_realip_module \
--with-stream_ssl_preread_module \
--with-compat \
--with-pcre \
--with-pcre=/home/user/pcre2 \
--with-pcre-jit \
--with-zlib=/home/user/zlib \
--with-openssl=/home/user/libressl \
--with-openssl-opt=--enable-shared \
--with-debug
# пишу всё в одну строку, это в вопросе на Хабре я так разметил, так как горизонтальная прокрутка - зло.

Ошибок нет. Затем собираю:
sudo make
Всё идёт хорошо, но под конец выводит, что-то типа:
...
/bin/ld: /home/user/libressl/.openssl/lib/libcrypto.a(libcrypto_la-asn_mime.o): relocation R_X86_64_32 against `.text' can not be used when making a PIE object; recompile with -fPIE
...
/bin/ld: /home/user/zlib/libz.a(inflate.o): relocation R_X86_64_32S against hidden symbol `zcfree' can not be used when making a PIE object
/bin/ld: /home/user/zlib/libz.a(inftrees.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
...
/bin/ld: /home/user/zlib/libz.a(inffast.o): relocation R_X86_64_32S against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIE
/bin/ld: /home/user/libressl/.openssl/lib/libcrypto.a(libcrypto_la-hm_ameth.o): warning: relocation in read-only section `.rodata'
collect2: error: ld returned 1 exit status
make[1]: *** [objs/Makefile:391: objs/nginx] Error 1
make[1]: Leaving directory '/home/user/nginx-1.26.1'
make: *** [Makefile:10: build] Error 2

Что я делаю не так? Или есть какой-нибудь другой способ поставить nginx с http3 на Almalinux?
  • Вопрос задан
  • 61 просмотр
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы