2016-08-02 165 views
0

上的开始,我收到此错误:如何在CentOs上安装php yaml?

Call to undefined function yaml_parse_file() 

我已经试过各种我已经找到了谷歌:

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软件库

+1

有没有php-yaml包?什么版本的CentOS? –

+0

yum命令后是否见过成功消息? – Klaus

+0

@JonathonReinhart - CentOS版本6.7(最终版) – CroiOS

回答

1

的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 

回购:须藤yum的安装EPEL释放

对于包:须藤荫安装PHP,YAML

记住重启httpd

+0

已安装:http://screencast.com/t/p2tjwipX – CroiOS

+0

yum install php-yaml?什么是我补习,yum安装epel-release只是回购。 – alekbless

+0

安装了epel-release,之后我跑了:yum --enablerepo = epel install php-yaml但我仍然收到错误。 – CroiOS