gpt4 book ai didi

gd - 安装了 php-gd 但无法在 centos 7(php 7.3 版本)中运行

转载 作者:行者123 更新时间:2023-12-05 09:10:20 51 4
gpt4 key购买 nike

我正在尝试安装 moodle,但它显示缺少/应该启用 php-gd 扩展。然而,gd 已经安装并且是最新的,当我命令 php -v 时,我收到以下错误,如下所示。

PHP Warning:  PHP Startup: Unable to load dynamic library 'gd.so' (tried: /usr/lib64/php/modules/gd.so (/lib64/libraqm.so.0: undefined symbol: hb_ft_font_set_load_flags), /usr/lib64/php/modules/gd.so.so (/usr/lib64/php/modules/gd.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.3.17 (cli) (built: Apr 14 2020 08:29:22) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.17, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.17, Copyright (c) 1999-2018, by Zend Technologies

我做了很多编辑,但找不到单一的解决方案。请帮忙

最佳答案

我遇到了同样的问题:

# php --version
PHP Warning: PHP Startup: Unable to load dynamic library 'gd' (tried: /usr/lib64/php/modules/gd (/usr/lib64/php/modules/gd: cannot open shared object file: No such file or directory), /usr/lib64/php/modules/gd.so (/lib64/libraqm.so.0: undefined symbol: hb_ft_font_set_load_flags)) in Unknown on line 0
PHP 7.2.32 (cli) (built: Jul 8 2020 07:33:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.32, Copyright (c) 1999-2018, by Zend Technologies

在 google 中快速搜索告诉我 hb_ft_font_set_load_flags 来自 HarfBuzz ( https://harfbuzz.github.io/harfbuzz-hb-ft.html )。

我用 yum install harfbuzz 安装了它,然后警告消失了:

php --version
PHP 7.2.32 (cli) (built: Jul 8 2020 07:33:50) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.32, Copyright (c) 1999-2018, by Zend Technologies

关于gd - 安装了 php-gd 但无法在 centos 7(php 7.3 版本)中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61638605/

51 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com