2015-07-17 2 views
2

On Centos 6, php 5.5Как установить Pecl Phar? (получение ошибок)

Я пытаюсь установить пакет PHAR с PECL. Во время установки я получаю «сделать не удалось» ошибка:

creating libtool 
appending configuration tag "CXX" to libtool 
configure: creating ./config.status 
config.status: creating config.h 
running: make 
/bin/sh /root/tmp/pear/pear-build-rootZdozvf/phar-2.0.0/libtool --mode=compile cc -I. -I/root/tmp/pear/phar -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootZdozvf/phar-2.0.0/include -I/root/tmp/pear/pear-build-rootZdozvf/phar-2.0.0/main -I/root/tmp/pear/phar -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/phar/util.c -o util.lo 
mkdir .libs 
cc -I. -I/root/tmp/pear/phar -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootZdozvf/phar-2.0.0/include -I/root/tmp/pear/pear-build-rootZdozvf/phar-2.0.0/main -I/root/tmp/pear/phar -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/phar/util.c -fPIC -DPIC -o .libs/util.o 
/root/tmp/pear/phar/util.c: In function ‘phar_mount_entry’: 
/root/tmp/pear/phar/util.c:205: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’ 
/root/tmp/pear/phar/util.c:205: error: ‘CHECKUID_CHECK_FILE_AND_DIR’ undeclared (first use in this function) 
/root/tmp/pear/phar/util.c:205: error: (Each undeclared identifier is reported only once 
/root/tmp/pear/phar/util.c:205: error: for each function it appears in.) 
/root/tmp/pear/phar/util.c: In function ‘phar_find_in_include_path’: 
/root/tmp/pear/phar/util.c:274: warning: assignment discards qualifiers from pointer target type 
/root/tmp/pear/phar/util.c: In function ‘phar_open_archive_fp’: 
/root/tmp/pear/phar/util.c:854: error: ‘struct _php_core_globals’ has no member named ‘safe_mode’ 
/root/tmp/pear/phar/util.c:854: error: ‘CHECKUID_ALLOW_ONLY_FILE’ undeclared (first use in this function) 
/root/tmp/pear/phar/util.c: In function ‘phar_add_virtual_dirs’: 
/root/tmp/pear/phar/util.c:2218: warning: assignment discards qualifiers from pointer target type 
make: *** [util.lo] Error 1 
ERROR: `make' failed 

Я не знаю, почему, но я пошел в PECL и увидел, что пакет PHAR имеет некоторые зависимости, я попытался установить первую зависимость в списке, BZ2, но потом я получил еще одну ошибку:

Make sure that you run '/usr/local/bin/phpize' in the top level source directory of the module 

И я нашел это очень useful post, который показал мне, как вручную загрузить пакет, поставить в нужном месте. Но после запуска ./configure я просто получаю сообщение, сообщающее мне повторно включить BZ2.

И поэтому я узнал, что могу установить pecl install --alldeps phar для установки всех зависимостей. Я сделал это, и теперь я получаю следующее сообщение об ошибке:

cc -I. -I/root/tmp/pear/hash -DPHP_ATOM_INC -I/root/tmp/pear/pear-build-rootm2aHqA/hash-1.5/include -I/root/tmp/pear/pear-build-rootm2aHqA/hash-1.5/main -I/root/tmp/pear/hash -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /root/tmp/pear/hash/hash.c -fPIC -DPIC -o .libs/hash.o 
/root/tmp/pear/hash/hash.c:785: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:792: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:799: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:807: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:815: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:822: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:828: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:835: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:842: error: duplicate ‘static’ 
/root/tmp/pear/hash/hash.c:848: error: duplicate ‘static’ 
make: *** [hash.lo] Error 1 
ERROR: `make' failed 

Я бы признателен за любую помощь в получении Phar установлен. Благодаря!

ответ

0

Отвечая на мой вопрос. Как оказалось, PHAR не был скомпилирован с PHP, и чтобы заставить его работать, мне пришлось перекомпилировать php с включенным пакетом PHAR.

 Смежные вопросы

  • Нет связанных вопросов^_^