gpt4 book ai didi

php - 在 linuxmint 中安装 php yaml

转载 作者:搜寻专家 更新时间:2023-10-31 21:16:19 27 4
gpt4 key购买 nike

当我尝试安装 php-yaml 时

$ sudo apt-get install php5
$ sudo apt-get install php5-dev
$ sudo apt-get install php-pear
$ sudo apt-get install libyaml-dev
$ sudo pecl install yaml-0.6.3
$ cd /etc/apache2/conf.d
$ sudo vi yaml.ini
extension=yaml.so
$ sudo apache2ctl restart

当我执行这个我得到了错误

$sudo pecl install yaml-0.6.3
downloading yaml-0.6.3.tgz ...
Starting to download yaml-0.6.3.tgz (33,871 bytes)
.........done: 33,871 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
building in /tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3
running: /tmp/pear/temp/yaml/configure
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
checking for PHP extension directory... /usr/lib/php5/20060613+lfs
checking for PHP installed headers prefix... /usr/include/php5
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable LibYAML suppot... yes, shared
checking for yaml in default path... found in /usr
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking yaml.h usability... yes
checking yaml.h presence... yes
checking for yaml.h... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/bash /tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3/libtool --mode=compile cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3/include -I/tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3/main -I/tmp/pear/temp/yaml -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -Wall -fno-strict-aliasing -c /tmp/pear/temp/yaml/yaml.c -o yaml.lo
libtool: compile: cc -I. -I/tmp/pear/temp/yaml -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3/include -I/tmp/pear/temp/pear-build-rootyLtUiZ/yaml-0.6.3/main -I/tmp/pear/temp/yaml -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DHAVE_CONFIG_H -Wall -fno-strict-aliasing -c /tmp/pear/temp/yaml/yaml.c -fPIC -DPIC -o .libs/yaml.o
In file included from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from /usr/include/php5/Zend/zend_operators.h:25,
from /usr/include/php5/Zend/zend.h:684,
from /usr/include/php5/main/php.h:34,
from /tmp/pear/temp/yaml/php_yaml.h:45,
from /tmp/pear/temp/yaml/yaml.c:34:
/usr/include/linux/errno.h:4:23: error: asm/errno.h: No such file or directory
In file included from /usr/include/sys/param.h:28,
from /usr/include/php5/main/php.h:212,
from /tmp/pear/temp/yaml/php_yaml.h:45,
from /tmp/pear/temp/yaml/yaml.c:34:
/usr/include/linux/param.h:4:23: error: asm/param.h: No such file or directory
In file included from /usr/include/sys/socket.h:40,
from /usr/include/php5/main/streams/php_stream_transport.h:22,
from /usr/include/php5/main/php_streams.h:437,
from /usr/include/php5/main/php.h:406,
from /tmp/pear/temp/yaml/php_yaml.h:45,
from /tmp/pear/temp/yaml/yaml.c:34:
/usr/include/bits/socket.h:366:24: error: asm/socket.h: No such file or directory
make: *** [yaml.lo] Error 1
ERROR: `make' failed

有错误:`make' 失败我不知道这是怎么回事...我用谷歌搜索这个错误只是引用了 linux 头文件和 GCC。对此有任何解决方案吗..?

最佳答案

很明显那些 header 丢失了。

在我的系统上,这些 header 由包 linux-libc-dev 安装。所以只需使用 sudo apt-get install linux-libc-dev 安装它们。这可能会解决这些错误。

关于php - 在 linuxmint 中安装 php yaml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7911453/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com