一开始我遇到了这个错误:
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
在 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/