簡體   English   中英

如何在 CentOs 上安裝 php yaml?

[英]How to install php yaml on CentOs?

一開始我收到這個錯誤:

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: 在此處輸入圖片說明

在 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

對於回購: sudo yum install epel-release

對於包: sudo yum install php-yaml

記得重啟httpd

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM