2016-08-02 162 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