Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

PEAR package PHP_Archive not installed Warning Causing Install Abort #115

Closed
cgunnels opened this Issue Mar 22, 2013 · 22 comments

Comments

Projects
None yet

I keep getting this error trying to install various version of php. What can I do to fix this?PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.

Contributor

loicfrering commented Mar 23, 2013

Are all these versions you are trying to build on the 5.5 branch?

No, they are versions i'm trying to install on my Mac.

Looks like I am experiencing the same issue right now.. (OSX Mavericks)

dz0ny commented Jan 14, 2014

👍

Step 16 : RUN php-build -i development 5.3.28 /opt/php/5.3
 ---> Running in a7e4a0cf0fba
[Info]: Loaded apc Plugin.
[Info]: Loaded pyrus Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: php.ini-development gets used as php.ini
[Info]: Building 5.3.28 into /opt/php/5.3
[Downloading]: http://php.net/distributions/php-5.3.28.tar.bz2
[Preparing]: /tmp/php-build/source/5.3.28
[Compiling]: /tmp/php-build/source/5.3.28
[Pyrus]: Downloading from http://pear2.php.net/pyrus.phar
[Pyrus]: Installing executable in /opt/php/5.3/bin/pyrus
[XDebug]: Downloading http://xdebug.org/files/xdebug-2.2.3.tgz
[XDebug]: Compiling in /tmp/php-build/source/xdebug-2.2.3

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_main.c:1828:9: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_main.c:1837:8: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_signals.c: In function 'sig_handler':
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_signals.c:177:7: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_unix.c: In function 'fpm_unix_init_child':
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/fpm_unix.c:186:8: warning: ignoring return value of 'chdir', declared with attribute warn_unused_result [-Wunused-result]
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/zlog.c: In function 'zlog_ex':
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/zlog.c:191:8: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
/tmp/php-build/source/5.3.28/sapi/fpm/fpm/zlog.c:195:8: warning: ignoring return value of 'write', declared with attribute warn_unused_result [-Wunused-result]
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.

Docker file https://github.com/wpdevtool/docker-php/blob/master/Dockerfile

So, this code in the upstream PHP project requires pear to be in the PATH?

This seems like a bit of a chicken and egg problem. Is there a quick way to get around this?

Never mind, this isn't the root of my problems. :S
Even with PHP_BUILD_CONFIGURE_OPTS="--disable-phar" I'm still getting an error somewhere causing the build to abort: https://gist.github.com/jokeyrhyme/11391714

@dz0ny thanks!

jk commented Jun 10, 2014

Same problem here, but patching using @dz0ny 's patch doesn't help. I still get the following error message:

PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
make: *** [ext/phar/phar.phar] Error 255

Any hints on fixing that? Building went successful, when I'm omitting --pear.

thasmo commented Jul 23, 2014

Got the same problem when installing PHP 5.3.28 and I don't use --pear.

Contributor

loicfrering commented Jul 26, 2014

@thasmo @jk are you building PHP on OSX as well?

thasmo commented Jul 26, 2014

@loicfrering @jk No, I'm running Ubuntu 14.04 64 bit.

Here's a workaround: run phpenv install as normal. When the build fails, do as follows:

cd /tmp/php/build/source/
make
make install

phpenv versions should then report that you have the version installed as expected

astlock commented Dec 1, 2014

Are there any normal solutions to this?

I met the same problem recently on Ubuntu 14.04.
The problem is solved with apt-get build-dep php5
Though message about PHP_Archive is still generated it is not causing php-build to fail.

yupmin commented Nov 17, 2015

i found this fix.
autoconf is needed. at ubuntu 12.04

sudo apt-get install autoconf

'> \dev\null' it is the cause for this issue.

On OSX while installing 7.0.0 i get the same error:

Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
clicommand.inc
directorygraphiterator.inc
directorytreeiterator.inc
invertedregexiterator.inc
pharcommand.inc
phar.inc
Owner

GrahamCampbell commented Dec 4, 2015

Pear support has been dropped now.

@yupmin thanks, it's works!

jmfarina commented Apr 6, 2017

Hello, sorry to re-open this, but I'm experiencing this problem with the latest version.
I get several different warnings while trying to install (in my case, php version 5.6.30), ending with a
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.

I followed @iamfinky 's suggestion and it worked like a charm (just had to run phpenv rehash afterwards to have the shell find the php command).
I'm not familiar with the code for the installation process, but given the error and the workaround, I would guess there's another problem, maybe some error that's not making it to the log ( @yupmin mentions a '> \dev\null', though for me it worked without installing autoconf as he proposes).

mxdlx commented May 10, 2017

My 2 cents on this. I also got compilation aborted but this thread saved me. Some data:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

$ uname -a
Linux grav 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

Also wrote down every package installed to get this working so I hope this helps:

build-essential
re2c
libxml2-dev
bison (asks for <2.7 version but apt-get got 3.0)
pkg-config
libbz2-dev
libcurl4-gnutls-dev
libjpeg-dev
libpng12-dev
libmcrypt-dev
libtidy-dev
libxslt1-dev
autoconf 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment