Celeb Glow
news | March 22, 2026

pecl install zip giving error ubuntu 12.04

I am trying to install zip using this command

pecl install zip

but I am getting below error

running: make
/bin/bash /tmp/pear/temp/pear-build-root9LqSPb/zip-1.12.4/libtool --mode=compile cc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root9LqSPb/zip-1.12.4/include -I/tmp/pear/temp/pear-build-root9LqSPb/zip-1.12.4/main -I/tmp/pear/temp/zip -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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/tmp/pear/temp/zip/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zip/php_zip.c -o php_zip.lo
libtool: compile: cc -I. -I/tmp/pear/temp/zip -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-root9LqSPb/zip-1.12.4/include -I/tmp/pear/temp/pear-build-root9LqSPb/zip-1.12.4/main -I/tmp/pear/temp/zip -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 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/tmp/pear/temp/zip/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/zip/php_zip.c -fPIC -DPIC -o .libs/php_zip.o
In file included from /tmp/pear/temp/zip/php_zip.c:30:0:
/usr/include/php5/ext/pcre/php_pcre.h:29:18: fatal error: pcre.h: No such file or directory
compilation terminated.
make: *** [php_zip.lo] Error 1
ERROR: `make' failed

Any idea what is wrong? Thanks

1

2 Answers

Perl compatible regular expressions - PCRE libraries is missing (...fatal error: pcre.h:...), because you are compiling module you should add dev packages too:

sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev 

Usually when make failed to build from sources, you have to install a -dev package, in your case it's php5-dev.

I'm not sure if it's the only one that you'll need to install but try first to install php5-dev:

sudo apt-get install php5-dev

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy