ubuntu系统安装nginx出现的错误,依赖环境没有安装完

报错信息:

error: the HTTP image filter module requires the GD library.

编译参数:(或源安装)

./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --enable-mods-shared=all --add-module=/usr/local/src/ngx_http_geoip2_module

过程报错:

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

解决方法:

安装 libgd-dev:

sudo apt-get install -y libgd-dev