crx349 发表于 2019-5-17 02:42:48

Debian GNU/Linux 8 编译Nginx失败解决方案(GD问题)



故障描述:
编译Nginx是提示:

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

You can either do not enable the module or install the libraries.

解决办法:

apt-get install libgd-dev libgd2-xpm-dev

出现无法获取包的情况,可以修改源为163

vi /etc/apt/sources.list
替换为以下内容
#deb http://mirrors.aliyuncs.com/debian jessie main contrib non-free
#deb http://mirrors.aliyuncs.com/debian jessie-proposed-updates main contrib non-free
#deb http://mirrors.aliyuncs.com/debian jessie-updates main contrib non-free
#deb http://mirrors.aliyuncs.com/debian jessie-backports main contrib non-free

#deb-src http://mirrors.aliyuncs.com/debian jessie main contrib non-free
#deb-src http://mirrors.aliyuncs.com/debian jessie-proposed-updates main contrib non-free
#deb-src http://mirrors.aliyuncs.com/debian jessie-updates main contrib non-free
#deb-src http://mirrors.aliyuncs.com/debian jessie-backports main contrib non-free

#deb http://mirrors.aliyuncs.com/debian-security/ jessie/updates main non-free contrib
#deb-src http://mirrors.aliyuncs.com/debian-security/ jessie/updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie main non-free contrib
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib

执行:
apt-get update

然后再运行获取包,重新编译nginx 通过
页: [1]
查看完整版本: Debian GNU/Linux 8 编译Nginx失败解决方案(GD问题)