【发布时间】:2020-01-12 09:41:43
【问题描述】:
我尝试在我的设备上安装 Yaml 1.3.2,它有 5.6 启用 php 版本...
执行此命令sudo pecl install yaml-1.3.2 后出现此错误:
creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-rootlbrA1X/yaml-1.3.2/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootlbrA1X/yaml-1.3.2/include -I/tmp/pear/temp/pear-build-rootlbrA1X/yaml-1.3.2/main -I/tmp/pear/temp/yaml -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/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-rootlbrA1X/yaml-1.3.2/include -I/tmp/pear/temp/pear-build-rootlbrA1X/yaml-1.3.2/main -I/tmp/pear/temp/yaml -I/usr/include/php/20190902 -I/usr/include/php/20190902/main -I/usr/include/php/20190902/TSRM -I/usr/include/php/20190902/Zend -I/usr/include/php/20190902/ext -I/usr/include/php/20190902/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:10: fatal error: ext/standard/php_smart_str.h: No such file or directory
#include <ext/standard/php_smart_str.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**compilation terminated.
Makefile:193: recipe for target 'yaml.lo' failed
make: *** [yaml.lo] Error 1
ERROR: `make' failed**
注意事项:
操作系统:Ubuntu 18
php5.6 -i | grep yaml
/etc/php/5.6/cli/conf.d/20-yaml.ini,
yaml
yaml.decode_binary => 0 => 0
yaml.decode_php => 1 => 1
yaml.decode_timestamp => 0 => 0
yaml.output_canonical => 0 => 0
yaml.output_indent => 2 => 2
yaml.output_width => 80 => 80
【问题讨论】: