PHP7 中的 pecl yaml 存在一些问题(请参阅下面的错误日志)。我可以看到:https ://pecl.php.net/package/yaml有一些 2.0 的 RC 可以解决这个问题......我目前正在运行命令:
pecl install yaml && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini.
但猜测这不会安装 RC 版本。如何安装 RC?也许有一个参数可以提供..?
我可以谷歌以下解决方案(未经测试):
pear config-set preferred_state beta
但我想这将为所有扩展设置一个全局 beta 状态。我只想将此扩展安装为 beta ..
错误日志
running: make
/bin/bash /tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/include -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/main -I/tmp/pear/temp/yaml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/yaml/yaml.c -o yaml.lo
mkdir .libs
cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/include -I/tmp/pear/temp/pear-build-defaultuserPVGidl/yaml-1.2.0/main -I/tmp/pear/temp/yaml -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/yaml/yaml.c -fPIC -DPIC -o .libs/yaml.o
In file included from /tmp/pear/temp/yaml/yaml.c:35:0:
/tmp/pear/temp/yaml/php_yaml.h:56:40: fatal error: ext/standard/php_smart_str.h: No such file or directory
#include <ext/standard/php_smart_str.h>
^
compilation terminated.
Makefile:195: recipe for target 'yaml.lo' failed
make: *** [yaml.lo] Error 1
ERROR: `make' failed