Php 通过pecl安装apcu在Debian上失败

Php 通过pecl安装apcu在Debian上失败,php,debian,pear,pecl,Php,Debian,Pear,Pecl,在Debian上,我安装了php5,php5-dev,phpear 然后我尝试安装apcu,但我得到了这个错误。有什么想法吗 # pecl install apcu Failed to download pecl/apcu within preferred state "stable", latest release is version 4.0.7, stability "beta", use "channel://pecl.php.net/apcu-4.0.7" to install ins

在Debian上,我安装了
php5
php5-dev
phpear

然后我尝试安装apcu,但我得到了这个错误。有什么想法吗

# pecl install apcu
Failed to download pecl/apcu within preferred state "stable", latest release is version 4.0.7, stability "beta", use "channel://pecl.php.net/apcu-4.0.7" to install
install failed

# pecl install channel://pecl.php.net/apcu-4.0.7
downloading apcu-4.0.7.tgz ...
Starting to download apcu-4.0.7.tgz (118,670 bytes)
..........................done: 118,670 bytes
43 source files, building
running: phpize
Configuring for:
PHP Api Version:         20100412
Zend Module Api No:      20100525
Zend Extension Api No:   220100525
Enable full APC compatibility [yes] : yes
Enable internal debugging in APCu [no] : 
building in /tmp/pear/temp/pear-build-root2kAfTA/apcu-4.0.7
running: /tmp/pear/temp/apcu/configure --enable-apc-bc=yes --enable-apcu-debug=no
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 whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-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
checking for PHP extension directory... /usr/lib/php5/20100525
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... no
checking for nawk... nawk
checking if nawk is broken... no
checking whether to enable APCu support... yes, shared
checking if APCu should provide APC full compatibility support... yes
checking if APCu should be allowed to use rwlocks... yes
checking if APCu should be built in debug mode... no
checking if APCu should clear on SIGUSR1... no
checking if APCu will use mmap or shm... mmap
checking if APCu should utilize spinlocks before flocks... no
configure: WARNING: APCu has access to native rwlocks
checking for sigaction... yes
checking for union semun... no
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 valgrind/memcheck.h usability... no
checking valgrind/memcheck.h presence... no
checking for valgrind/memcheck.h... no
checking for shm_open in -lrt... yes
checking whether to include code coverage symbols... no
checking how to print strings... printf
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 how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
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 dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking for gawk... (cached) nawk
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
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 -m elf_x86_64) 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
sh: 1: make: not found
ERROR: `make' failed
编辑:操作,我没有安装“make”(这很荒谬,如果pecl需要它,它应该是一个依赖项,并且在安装上述软件包时自动安装)

无论如何,现在我得到了这个错误:

In file included from /tmp/pear/temp/apcu/apc.c:44:0:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file 
or directory
compilation terminated.
make: *** [apc.lo] Error 1
ERROR: `make' failed
看起来缺少另一个依赖项

这些包管理器不应该自动安装所有依赖项吗


有没有比手动安装丢失的每一个部件更简单的方法呢?

在Debian上最简单的方法是使用
apt get install php5 apcu
您可能需要将特殊包存储库添加到
/etc/apt/sources.list
,以便提取此包:

deb http://packages.dotdeb.org wheezy-php55 all
deb-src http://packages.dotdeb.org wheezy-php55 all

我没有安装make(如果pecl需要的话,这很可笑) 它应该是一个依赖项,并且在运行时已自动安装 安装上述软件包)

我赞成。它应该是一个依赖项,您应该在phpize期间得到一条正确的消息。但我不确定是否应该自动安装用于构建或编译的开发工具


可能的替代方法:使用名为Pickle的工具

下载:


php pickle.phar在另一台服务器上安装apcu

,我遵循了您的第一种方法,它显然安装了软件包,但扩展在php中仍然不可用。我尝试将“extension=”apcu.so“”添加到php.ini中,但没有做任何更改。然后我将apcu.so文件从安装位置复制到所有其他php扩展的实际位置,但仍然没有成功。有什么想法吗?我想到两件事:a)请检查,您是否将APCu扩展添加到了正确的php.ini文件中。在debian上可能有多个配置,例如一个用于CLI,一个用于webserver,如果您有FCGI设置(每个vhost/server块一个),可能还有更多配置
php-i | grep php.ini,php-m | grep apcu
b)请检查apcu扩展的版本是否适合您的php版本。如果扩展是为另一个版本的PHP编译的,并且不适合,PHP将打印一条错误消息。但这太离谱了,因为apt获取了它并将其加工到您的版本。结果表明,通过apt安装的版本(我复制到extensions文件夹并使用的版本)已损坏。我可以通过运行
php-m
,并在开始时注意到一条错误消息,如“无法初始化模块”,来解决这个问题。所以我卸载了那个,使用了通过PECL安装的那个,那个可以工作。啊,好的。我在最后一句话中排除了这一点:(如果apt的源代码是混合的,可能会发生这种情况。PHP从一个源代码获取(或预安装在服务器上),包从中获取。无论如何:很高兴你解决了它。