CentOS环境下Nginx源码编译安装产生错误缺失GD库的问题解决 centos6 宝塔面板安装nginx报错 缺少GD library环境依赖包
在
nginx
源码编译安装时,可能会碰到以下错误:./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.12
很显然,错误提示非常明显,缺失 GD
库,即使你不安装该模块也可以继续进行安装,但是后续使用可能会产生错误,这里应该进行解决,安装该模块即可。
实际上,该模块也可以去官网获取文件然后进行源码编译。
但这里,我们一切从简, CentOS 环境 解决如下 :输入yum search GD 查看安装包,然后输入 sudo yum install -y gd-devel.x86_64
[centos@localhost nginx-1.16.1]$ :<<! 先用 yum 查找 'GD' 库,知道存在包 `gd-devel.x86_64` 需要安装![centos@localhost nginx-1.16.1]$ yum search GD 已加载插件:fastestmirror, langpacks Repository base is listed more than once in the configuration Repository updates is listed more than once in the configuration Repository extras is listed more than once in the configuration Repository centosplus is listed more than once in the configuration Repository contrib is listed more than once in the configuration Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com * webtatic: us-east.repo.webtatic.com============================================= N/S matched: GD =============================================compat-libgdata13.i686 : Compat package with libgdata 0.13 libraries compat-libgdata13.x86_64 : Compat package with libgdata 0.13 libraries gd-devel.i686 : The development libraries and header files for gd gd-devel.x86_64 : The development libraries and header files for gd gd-progs.x86_64 : Utility programs that use libgd gdb-doc.noarch : Documentation for GDB (the GNU source-level debugger)gdb-gdbserver.x86_64 : A standalone server for GDB (the GNU source-level debugger)gdbm-devel.i686 : Development libraries and header files for the gdbm library gdbm-devel.x86_64 : Development libraries and header files for the gdbm library gdk-pixbuf2-devel.i686 : Development files for gdk-pixbuf gdk-pixbuf2-devel.x86_64 : Development files for gdk-pixbuf gdk-pixbuf2-tests.x86_64 : Tests for the gdk-pixbuf2 package gdm-devel.i686 : Development files for gdm gdm-devel.x86_64 : Development files for gdm gdm-pam-extensions-devel.i686 : Macros for developing GDM extensions to PAM gdm-pam-extensions-devel.x86_64 : Macros for developing GDM extensions to PAM graphviz-gd.i686 : Graphviz plugin for renderers based on gd graphviz-gd.x86_64 : Graphviz plugin for renderers based on gd gupnp-igd.i686 : Library to handle UPnP IGD port mapping gupnp-igd.x86_64 : Library to handle UPnP IGD port mapping gupnp-igd-devel.i686 : Development files for gupnp-igd gupnp-igd-devel.x86_64 : Development files for gupnp-igd gupnp-igd-python.x86_64 : Python bindings for gupnp-igd libgdata.i686 : Library for the GData protocol libgdata.x86_64 : Library for the GData protocol libgdata-devel.i686 : Development files for libgdata libgdata-devel.x86_64 : Development files for libgdata libgdither-devel.i686 : Development files for libgdither libgdither-devel.x86_64 : Development files for libgdither libreoffice-gdb-debug-support.x86_64 : Additional support for debugging with gdb perl-GD.x86_64 : Perl interface to the GD graphics library perl-GD-Barcode.noarch : Create barcode image with GD php-gd.x86_64 : A module for PHP applications for using the gd graphics library php55w-gd.x86_64 : A module for PHP applications for using the gd graphics library php56w-gd.x86_64 : A module for PHP applications for using the gd graphics library php70w-gd.x86_64 : A module for PHP applications for using the gd graphics library php71w-gd.x86_64 : A module for PHP applications for using the gd graphics library php72w-gd.x86_64 : A module for PHP applications for using the gd graphics library pulseaudio-gdm-hooks.x86_64 : PulseAudio GDM integration relaxngDatatype-javadoc.noarch : API documentation for relaxngDatatype rubygem-bigdecimal.x86_64 : BigDecimal provides arbitrary-precision floating point decimal arithmetic cgdcbxd.x86_64 : DCB network priority management daemon gd.i686 : A graphics library for quick creation of PNG or JPEG images gd.x86_64 : A graphics library for quick creation of PNG or JPEG images gdb.x86_64 : A GNU source-level debugger for C, C++, Fortran, Go and other languages gdbm.i686 : A GNU set of database routines which use extensible hashing gdbm.x86_64 : A GNU set of database routines which use extensible hashing gdisk.x86_64 : An fdisk-like partitioning tool for GPT disks gdk-pixbuf2.i686 : An image loading library gdk-pixbuf2.x86_64 : An image loading library gdm.i686 : The GNOME Display Manager gdm.x86_64 : The GNOME Display Manager hunspell-gd.noarch : Scots Gaelic hunspell dictionaries libgdither.i686 : Library for applying dithering to PCM audio sources libgdither.x86_64 : Library for applying dithering to PCM audio sources relaxngDatatype.noarch : RELAX NG Datatype API swig3-gdb.x86_64 : Commands for easier debugging of SWIG 名称和简介匹配 only,使用“search all”试试。[centos@localhost nginx-1.16.1]$ # 安装 gd-devel.x86_64 库[centos@localhost nginx-1.16.1]$ sudo yum install -y gd-devel.x86_64 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
这样就解决了该问题,只需要重新编译 nginx 即可。
这里顺便补充一下,nginx 还可能报缺失其他库的错误。比如缺失 pcre
, zlib
, openssl
库等,这些缺失库的问题处理都大同小异。 除了去官方下载源码进行编译之外,也可以通过依赖包软件管理器进行对应的库安装。 我们这里采用的办法就是第二种,更简便。这样就可以解决这种问题。
实际上, GD
库是许多软件必备的依赖库,不一定是 nginx 。
文章出处:centos6 宝塔面板安装nginx报错 缺少GD library环境依赖包_菜市场网络技术交流社区|游戏服务端|游戏源代码|手游服务端|游戏模拟器|永恒之塔私服 官方网址:http://bbs.aionchs.com/
无标签
-
永恒之塔AION通用登陆器
2024-11-17栏目: 登陆器
-
挑战OL商业登陆器
2024-11-17栏目: 登陆器
-
aion xml 真端修改工具
2024-11-11栏目: 登陆器
-
希望OL通用登陆器网关
2024-10-25栏目: 登陆器
-
上古世纪模拟器服务端最新版本
2024-08-25栏目: 亲自端游
-
希望OL,seal2022,美端-【原子弹来了】完整包际带英文端和中文端 免费公开大家下载了。
2022-11-24栏目: 亲自端游
-
最新 SEAL2023 希望美端-称号系统-食客+修复1和4闪退问题
2022-12-27栏目: 亲自端游
-
希望OL昆仑服务端+副本+飞越架设教学
2022-06-19栏目: 亲自端游
-
seal2024全功能免费端 希望OL 希望戀曲 sealonline +2个皮肤客户端
2024-03-14栏目: 亲自端游
-
最新希望OL美端服务端,seal2024 新客户端版本+白漂版服务端,希望戀曲,sealonline
2023-09-09栏目: 亲自端游
特别推荐 2025年03月23日 星期日
精彩发现
相关文章
广告位不存在!
广告已过期!
广告已过期!
发表评论 已发布 0 条