在 linuxmint 中安装 php yaml

发布于 2024-12-12 06:48:04 字数 7042 浏览 0 评论 0原文

当我尝试安装 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

其中有 ERROR: `make' failed 我不知道这是怎么回事...我用 google 搜索这个错误,只是引用了 linux header 和 GCC。有任何解决方案吗?

when i try to install php-yaml with

$ 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

when i'm execute this
i'm get the error

$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

there are ERROR: `make' failed i don't know what about this...i google with this error just reference to linux header and GCC.any solution for this..?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

霊感 2024-12-19 06:48:04

显然这些标头丢失了。

在我的系统上,这些头文件是由 linux-libc-dev 包安装的。因此,只需使用 sudo apt-get install linux-libc-dev 安装它们即可。这可能会解决这些错误。

Well apparently those headers are missing.

On my system those headers are installed by the package linux-libc-dev. So just install them with sudo apt-get install linux-libc-dev. That might solve those errors.

誰ツ都不明白 2024-12-19 06:48:04

我意识到这是一个旧线程,但一个小的更正可能对未来的访问者有所帮助:

错误:

cd /etc/apache2/conf.d

正确:< /强>

cd /etc/php5/apache2/conf.d

I realize this is an old thread, but a minor correction may be helpful to future visitors:

wrong:

cd /etc/apache2/conf.d

right:

cd /etc/php5/apache2/conf.d
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文