在PHP7中遇到pecl yaml的一些问题(参见下面的错误日志).我可以看到:https://pecl.php.net/package/yaml是有一些RC的2.0用于解决问题...我正在运行命令:
pecl install yaml && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini.
但是猜测这不会安装RC版本.如何安装RC?是否有供应的参数..?
我可以谷歌下面的解决方案(未测试):
pear config-set preferred_state 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^ compilation terminated. Makefile:195: recipe for target 'yaml.lo' failed make: *** [yaml.lo] Error 1 ERROR: `make' failed
superhero.. 17
所以经过一些额外的google搜索,我发现了如何通过搜索如何安装测试版要安装的软件包,而不是钢筋混凝土的,因为我第一次在找.. 面掌
http://php.net/manual/en/install.pecl.pear.php
..所以正确的命令是:
pecl install yaml-beta && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini
稳定的2.0.0发布于2016-09-24.版本1.xx仍然受支持,因此您需要指定版本号,例如:
pecl install yaml-2.0.0 && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini
在https://pecl.php.net/package/yaml上查找最新版本
所以经过一些额外的google搜索,我发现了如何通过搜索如何安装测试版要安装的软件包,而不是钢筋混凝土的,因为我第一次在找.. 面掌
http://php.net/manual/en/install.pecl.pear.php
..所以正确的命令是:
pecl install yaml-beta && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini
稳定的2.0.0发布于2016-09-24.版本1.xx仍然受支持,因此您需要指定版本号,例如:
pecl install yaml-2.0.0 && echo "extension=yaml.so" > /usr/local/etc/php/conf.d/ext-yaml.ini
在https://pecl.php.net/package/yaml上查找最新版本