0

I am trying to build nginx from source with the http_image_filter_module but when I add it I get an error.

I run the command below, and it works until I add the --with-http_image_filter_module arg, which causes it to fail with the error:

>   checking for GD library ... not found
>   checking for GD library in /usr/local/ ... not found
>   checking for GD library in /usr/pkg/ ... not found
>   checking for GD library in /opt/local/ ... not found

>   ./configure: error: the HTTP image filter module requires the GD library.
>   You can either do not enable the module or install the libraries.

I have tried to both add the GD library using the package manager, i.e.

apt install libgd-dev 

as well as building it from source in the /usr/local directory:

cd /usr/local \
    && wget https://github.com/libgd/libgd/releases/download/gd-2.3.3/libgd-2.3.3.tar.gz \
    && tar -xvof libgd-2.3.3.tar.gz \
    && cd libgd-2.3.3 \
    && ./configure \
    && make \
    && make install

but for some reason it is not found during the compilation.

Here is my full command, which is followed by make && make install:

./configure  --prefix=${NGINX_RUN}/html --sbin-path=${NGINX_BIN} --conf-path=${NGINX_CONF}/nginx.conf \
    --http-log-path=${NGINX_LOG}/access.log --error-log-path=${NGINX_LOG}/error.log \
    --with-pcre --lock-path=${NGINX_LOG}/nginx.lock --pid-path=${NGINX_LOG}/nginx.pid \
    --with-http_ssl_module --with-http_realip_module --with-http_sub_module \
    --with-http_image_filter_module \ 
    --modules-path=/etc/nginx/modules --with-http_v2_module \
    --with-stream --with-http_addition_module --with-http_mp4_module \
    --with-cc-opt="-static -static-libgcc" --with-ld-opt="-static" 

0

You must log in to answer this question.

Browse other questions tagged .