安装报错:
./configure: error: the HTTP image filter module requires the GD library. You can either do not enable the module or install the libraries.文章来源:https://www.toymoban.com/news/detail-444420.html
make: *** No rule to make target 'build', needed by 'default'. Stop. make: *** No rule to make target 'install'. Stop.
/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://www.toymoban.com/news/detail-444420.html
到了这里,关于宝塔安装nginx报错【已解决】的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!