一开始我遇到了这个错误:
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支持的正确方法是什么?
答案 0 :(得分:0)
来自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