在Linux上安装PHP SVN扩展时出错


Errors installing PHP SVN extension on Linux

我正在尝试在运行PHP 5.3.3的Fedora 23上安装PHP SVN扩展,以便我可以从我的应用程序中与repo接口。

以root用户运行命令:

yum install subversion subversion-devel neon neon-devel
pecl install svn

收益率:

/var/tmp/svn/svn.c: In function ‘init_svn_client’:
/var/tmp/svn/svn.c:406: warning: ‘svn_client_get_simple_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:160)
/var/tmp/svn/svn.c:409: warning: ‘svn_client_get_username_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:207)
/var/tmp/svn/svn.c:412: warning: ‘svn_client_get_ssl_server_trust_prompt_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:274)
/var/tmp/svn/svn.c:416: warning: ‘svn_client_get_ssl_server_trust_file_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:223)
/var/tmp/svn/svn.c:419: warning: ‘svn_client_get_ssl_client_cert_file_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:240)
/var/tmp/svn/svn.c:422: warning: ‘svn_client_get_ssl_client_cert_pw_file_provider’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:257)
/var/tmp/svn/svn.c: In function ‘zif_svn_import’:
/var/tmp/svn/svn.c:564: warning: ‘svn_client_import’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1649)
/var/tmp/svn/svn.c: In function ‘zif_svn_ls’:
/var/tmp/svn/svn.c:1009: warning: ‘svn_client_ls2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:4060)
/var/tmp/svn/svn.c:1024: error: ‘for’ loop initial declarations are only allowed in C99 mode
/var/tmp/svn/svn.c:1024: note: use option -std=c99 or -std=gnu99 to compile your code
/var/tmp/svn/svn.c:1035: warning: passing argument 2 of ‘svn_utf_cstring_to_utf8’ makes pointer from integer without a cast
/usr/include/subversion-1/svn_utf.h:78: note: expected ‘const char *’ but argument is of type ‘int’
/var/tmp/svn/svn.c:1036: warning: assignment makes pointer from integer without a cast
/var/tmp/svn/svn.c: In function ‘php_svn_log_receiver’:
/var/tmp/svn/svn.c:1130: error: ‘for’ loop initial declarations are only allowed in C99 mode
/var/tmp/svn/svn.c:1138: warning: assignment makes pointer from integer without a cast
/var/tmp/svn/svn.c:1139: warning: assignment makes pointer from integer without a cast
/var/tmp/svn/svn.c:1142: warning: passing argument 4 of ‘add_assoc_string_ex’ discards qualifiers from pointer target type
/usr/include/php/Zend/zend_API.h:360: note: expected ‘char *’ but argument is of type ‘const char *’
/var/tmp/svn/svn.c: In function ‘zif_svn_log’:
/var/tmp/svn/svn.c:1235: warning: ‘svn_client_log3’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:2006)
/var/tmp/svn/svn.c: In function ‘zif_svn_diff’:
/var/tmp/svn/svn.c:1395: warning: ‘svn_client_diff3’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:2286)
/var/tmp/svn/svn.c: In function ‘zif_svn_revert’:
/var/tmp/svn/svn.c:1515: warning: ‘svn_client_revert’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:2999)
/var/tmp/svn/svn.c: In function ‘zif_svn_resolved’:
/var/tmp/svn/svn.c:1565: warning: ‘svn_client_resolved’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3022)
/var/tmp/svn/svn.c: In function ‘zif_svn_info’:
/var/tmp/svn/svn.c:2236: warning: ‘svn_client_info’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:4533)
/var/tmp/svn/svn.c: In function ‘zif_svn_export’:
/var/tmp/svn/svn.c:2301: warning: ‘svn_client_export3’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3882)
/var/tmp/svn/svn.c: In function ‘zif_svn_switch’:
/var/tmp/svn/svn.c:2362: warning: ‘svn_client_switch’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1284)
/var/tmp/svn/svn.c: In function ‘zif_svn_copy’:
/var/tmp/svn/svn.c:2431: warning: ‘svn_client_copy2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3214)
/var/tmp/svn/svn.c: In function ‘zif_svn_blame’:
/var/tmp/svn/svn.c:2554: warning: ‘svn_client_blame2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:2153)
/var/tmp/svn/svn.c: In function ‘zif_svn_delete’:
/var/tmp/svn/svn.c:2609: warning: assignment discards qualifiers from pointer target type
/var/tmp/svn/svn.c:2610: warning: ‘svn_client_delete2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1533)
/var/tmp/svn/svn.c: In function ‘zif_svn_mkdir’:
/var/tmp/svn/svn.c:2680: warning: ‘svn_client_mkdir2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1448)
/var/tmp/svn/svn.c: In function ‘zif_svn_move’:
/var/tmp/svn/svn.c:2760: warning: ‘svn_client_move3’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3362)
/var/tmp/svn/svn.c: In function ‘zif_svn_proplist’:
/var/tmp/svn/svn.c:2833: warning: ‘svn_client_proplist2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3754)
/var/tmp/svn/svn.c: In function ‘zif_svn_propget’:
/var/tmp/svn/svn.c:2915: warning: ‘svn_client_propget2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3648)
/var/tmp/svn/svn.c: In function ‘zif_svn_propset’:
/var/tmp/svn/svn.c:2990: warning: ‘svn_client_propset2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3497)
/var/tmp/svn/svn.c: In function ‘zif_svn_prop_delete’:
/var/tmp/svn/svn.c:3048: warning: ‘svn_client_propset2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3497)
/var/tmp/svn/svn.c: In function ‘zif_svn_revprop_set’:
/var/tmp/svn/svn.c:3165: warning: ‘svn_client_revprop_set’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3577)
/var/tmp/svn/svn.c: In function ‘zif_svn_revprop_delete’:
/var/tmp/svn/svn.c:3222: warning: ‘svn_client_revprop_set’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:3577)
/var/tmp/svn/svn.c: In function ‘zif_svn_repos_recover’:
/var/tmp/svn/svn.c:3324: warning: ‘svn_repos_recover2’ is deprecated (declared at /usr/include/subversion-1/svn_repos.h:372)
/var/tmp/svn/svn.c: In function ‘zif_svn_commit’:
/var/tmp/svn/svn.c:3466: warning: ‘svn_client_commit3’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1739)
/var/tmp/svn/svn.c: In function ‘zif_svn_add’:
/var/tmp/svn/svn.c:3645: warning: ‘svn_client_add2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1373)
/var/tmp/svn/svn.c: In function ‘zif_svn_status’:
/var/tmp/svn/svn.c:3755: warning: ‘svn_client_status2’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1867)
/var/tmp/svn/svn.c: In function ‘zif_svn_update’:
/var/tmp/svn/svn.c:3818: warning: ‘svn_client_update’ is deprecated (declared at /usr/include/subversion-1/svn_client.h:1200)
/var/tmp/svn/svn.c: In function ‘zif_svn_repos_fs_begin_txn_for_commit’:
/var/tmp/svn/svn.c:3955: warning: ‘svn_repos_fs_begin_txn_for_commit’ is deprecated (declared at /usr/include/subversion-1/svn_repos.h:1659)
/var/tmp/svn/svn.c: In function ‘zif_svn_fs_open_txn’:
/var/tmp/svn/svn.c:4643: warning: passing argument 1 of ‘svn_fs_open_txn’ from incompatible pointer type
/usr/include/subversion-1/svn_fs.h:854: note: expected ‘struct svn_fs_txn_t **’ but argument is of type ‘struct php_svn_repos_fs_txn **’
/var/tmp/svn/svn.c:4653: warning: assignment from incompatible pointer type
make: *** [svn.lo] Error 1
ERROR: `make' failed

同样的事情,如果我得到源代码,php, ./configure,并运行make自己。

我用另一种方法解决了这个问题。而不是从perl编译包,(这对我来说失败的方式和OP一样)-我通过RPM包安装它来工作。

这里的页面有可以帮助的rpm(它有FC24和PHP 5.6链接,但我认为通过一些挖掘你会找到确切需要的东西)。我知道这个问题是近三年前问的,所以我希望这对你有所帮助。我也希望你已经升级到PHP 5.3.3以上。

如果您已经升级了PHP和/或操作系统,您也可以尝试CentOS.pkgs.org。祝你好运。