安装报错:
./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.
/www/server/panel/install/public.sh: line 126: cmake: command not found CentOS Linux release 8.3.2011 Bit:64 Mem:1848M Core:1 gcc:8.3.1 cmake: Linux 4.18.0-240.1.1.el8_3.x86_64 x86_64 ERROR: nginx-1.22.1 installation failed.
报错原因:
requires the GD library 缺少GD库
解决方案:
1、安装GD库
sudo dnf install gd gd-devel
sudo dnf install cmake
如果报错:
Error: Failed to download metadata for repo 'PowerTools': Cannot prepare internal mirrorlist: No URLs in mirrorlist
通常是由于系统无法访问PowerTools存储库而导致的。
手动编辑存储库文件以添加正确的URL。存储库文件通常位于/etc/yum.repos.d/目录中。
具体方法:
1、备份yum.repos.d下的文件,防止操作出错无法恢复
》cd /etc
》mkdir backup
将文件递归复制到backup
》cp /etc/yum.repos.d /etc/backup -l
编辑
》vim CentOS-PowerTools.repo
内容如下:
[PowerTools]
name=CentOS-$releasever - PowerTools
baseurl=http://mirror.centos.org/centos/$releasever/PowerTools/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
保存退出
至此,重新清空执行安装GD库
再到宝塔安装Nginx成功!!!!!!!!!
来源地址:https://blog.csdn.net/King_QW/article/details/129838141