gpt4 book ai didi

php - 如何在CentOs上安装php yaml?

转载 作者:行者123 更新时间:2023-12-04 19:32:10 25 4
gpt4 key购买 nike

一开始我遇到了这个错误:

Call to undefined function yaml_parse_file()

我已经尝试了通过 google 找到的所有内容:

yum install libyaml
yum install yaml
yum install perl-yaml

等等

现在我得到:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/extensions/no-debug-non-zts-20100525/yaml.so' - /usr/lib64/extensions/no-debug-non-zts-20100525/yaml.so: cannot open shared object file: No such file or directory in Unknown on line 0
Exception: Extension yaml does not exist

已经添加

extension=yaml.so

在 php.ini 文件中

详细信息:

CentOS release 6.7 (Final)
PHP 5.4.45

SS 在我运行上面的安装命令之后: enter image description here

在 php 中安装 yaml 支持的正确方法是什么?

最佳答案

来自 epel 存储库的 php-yaml:

php-pecl-yaml-1.1.1-5.el6.x86_64 : Support for YAML 1.1 serialization
using the LibYAML library
Repo : epel
Matched from:
Other: php-yaml

对于 repo :sudo yum install epel-release

对于包:sudo yum install php-yaml

记得重启httpd

关于php - 如何在CentOs上安装php yaml?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38717979/

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