Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/perl/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
有人成功安装了php perl扩展吗?_Php_Perl_Pecl - Fatal编程技术网

有人成功安装了php perl扩展吗?

有人成功安装了php perl扩展吗?,php,perl,pecl,Php,Perl,Pecl,我尝试过三种不同的方法,但都不奏效。第一: root@TheBad:/usr/local/src/# pecl install perl Package "perl" Version "1.0.0" does not have REST xml available install failed 第二种方法:下载tar文件并让pecl尝试安装: root@TheBad:/usr/local/src/php-perl# wget 'http://pecl.php.net/get/perl-1.0.

我尝试过三种不同的方法,但都不奏效。第一:

root@TheBad:/usr/local/src/# pecl install perl
Package "perl" Version "1.0.0" does not have REST xml available
install failed
第二种方法:下载tar文件并让pecl尝试安装:

root@TheBad:/usr/local/src/php-perl# wget 'http://pecl.php.net/get/perl-1.0.0.tgz'
root@TheBad:/usr/local/src/php-perl# pecl install perl-1.0.0.tgz 
No release notes found
Parsing of package.xml from file "/build/buildd/php5-5.3.2/pear-build-download/package.xml" failed
install failed
第三种方法:提取tar文件,尝试手动安装:

root@TheBad:/usr/local/src/php-perl# tar xf perl-1.0.0.tgz 
root@TheBad:/usr/local/src/php-perl# cd perl-1.0.0/
root@TheBad:/usr/local/src/php-perl/perl-1.0.0# phpize
Configuring for:
PHP Api Version:         20090626
Zend Module Api No:      20090626
Zend Extension Api No:   220090626
root@TheBad:/usr/local/src/php-perl/perl-1.0.0# ./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
.......(configures successfully)
root@TheBad:/usr/local/src/php-perl/perl-1.0.0# make install
/bin/bash /usr/local/src/php-perl/perl-1.0.0/libtool --mode=compile cc  -I. -I/usr/local/src/php-perl/perl-1.0.0 -DPHP_ATOM_INC -I/usr/local/src/php-perl/perl-1.0.0/include -I/usr/local/src/php-perl/perl-1.0.0/main -I/usr/local/src/php-perl/perl-1.0.0 -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  -DHAVE_CONFIG_H  -g -O2 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE  -c /usr/local/src/php-perl/perl-1.0.0/php_perl.c -o php_perl.lo 
libtool: compile:  cc -I. -I/usr/local/src/php-perl/perl-1.0.0 -DPHP_ATOM_INC -I/usr/local/src/php-perl/perl-1.0.0/include -I/usr/local/src/php-perl/perl-1.0.0/main -I/usr/local/src/php-perl/perl-1.0.0 -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 -DHAVE_CONFIG_H -g -O2 -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/perl/5.10/CORE -c /usr/local/src/php-perl/perl-1.0.0/php_perl.c  -fPIC -DPIC -o .libs/php_perl.o
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:172: warning: initialization from incompatible pointer type
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:173: warning: initialization from incompatible pointer type
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:199: warning: initialization from incompatible pointer type
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:200: warning: initialization from incompatible pointer type
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_zval_to_sv_ref’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:343: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:350: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_zval_to_sv_noref’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:393: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:423: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_sv_to_zval_ref’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:483: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:485: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_sv_to_zval_noref’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:511: warning: passing argument 3 of ‘Perl_sv_2pv_flags’ from incompatible pointer type
/usr/lib/perl/5.10/CORE/proto.h:3039: note: expected ‘STRLEN *’ but argument is of type ‘int *’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:558: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_call_method’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:651: warning: passing argument 3 of ‘Perl_sv_2pv_flags’ from incompatible pointer type
/usr/lib/perl/5.10/CORE/proto.h:3039: note: expected ‘STRLEN *’ but argument is of type ‘int *’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_call’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:714: warning: passing argument 3 of ‘Perl_sv_2pv_flags’ from incompatible pointer type
/usr/lib/perl/5.10/CORE/proto.h:3039: note: expected ‘STRLEN *’ but argument is of type ‘int *’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_get’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:753: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_read_dimension’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:827: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:828: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:836: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_read_property’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:976: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:993: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1010: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1088: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1089: error: ‘zval’ has no member named ‘is_ref’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1096: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_clone’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1637: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘unsigned int’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘php_perl_get_iterator’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1758: error: ‘zval’ has no member named ‘refcount’
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘zm_startup_perl’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1779: warning: assignment from incompatible pointer type
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘zm_info_perl’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1805: warning: unknown conversion type character ‘v’ in format
/usr/local/src/php-perl/perl-1.0.0/php_perl.c: In function ‘zim_Perl_eval’:
/usr/local/src/php-perl/perl-1.0.0/php_perl.c:1867: warning: passing argument 3 of ‘Perl_sv_2pv_flags’ from incompatible pointer type
/usr/lib/perl/5.10/CORE/proto.h:3039: note: expected ‘STRLEN *’ but argument is of type ‘int *’
make: *** [php_perl.lo] Error 1
我在网上寻找了所有这些问题的解决方案,但没有找到任何实质性的解决方案。以前有没有人解决过这个问题,或者知道出了什么问题

编辑:
以下是我的程序的版本信息,以备不时之需:
内核-2.6.32-27-generic
GCC-4.4.3
梨-1.9.0
PHP-5.3.2-1ubuntu4.5

Zend-2.3.0

这里有更新的源代码:

由于某种原因,它从未被包装进PECL包装中

PECL方案:2006-02-13

源代码:2009-10-06

尝试从以下位置下载php_perl.c:

将它放在编译的地方,然后尝试另一个手动重新编译

请注意,此模块可能被描述为“不稳定”


另外:从同一存储库下载php_perl.h:


然后进行编译。

设法使Pecl Perl模块安装成功

我将用Unix风格(Mac OS X Lion)进行解释

  • 安装
    Xcode
    (用于编译器),因为它还将安装php源文件
  • 安装
    Macports
    以安装
    re2c
    软件包
  • 运行命令创建从php源代码到
    /usr/include

    sudo ln-s/Developer/SDKs/MacOSX10.7.sdk/usr/include/usr/include

  • 下载PECL PERL包

  • 从PECL SVN下载php_perl.c并覆盖以前下载的php_perl.c

  • 将cd放入文件夹中

  • vi php_perl.h并添加

    #define PHP_PERL_VERSION 0 
    
在#endif结束之前

  • 运行这些命令

    sudo phpize
    ./configure --with-perl=/usr/bin/perl --with-php-config=/usr/bin/php-config
    sudo make
    sudo make install
    
编辑php.ini以在动态扩展部分添加perl扩展

extension=perl.so
请记住,在Mac OS Lion中,.so项将进入文件夹

/usr/lib/php/extensions/no-debug-non-zts-20090626/

重新启动apache并重试您的
phpinfo()

对于很多人来说,第一种和第二种安装方法(使用pecl)似乎都失败了,因此这可能不是软件包维护人员的目的,这就产生了为什么手动安装不起作用的真正问题。有关更多详细信息,请参阅。介意将您的问题移至serverfault.com吗?serverfault不是更适合服务器相关问题吗?我想,因为我们讨论的是php,所以这间接地是一个与服务器相关的问题,但实际上这是一个软件问题。我真的不介意,我只是好奇而已