I'm using OpenBSD 5.5(with vagrant box:tmatilai/openbsd-5.5).
I installed php, pear and gnupg with pkg_add command.
Also, I installed PECL::APC with pecl command.
However, when I try to install PECL::gnupg with pecl command(pecl install gnupg), install fails with following message.
# pecl install gnupg
downloading gnupg-1.3.3.tgz ...
Starting to download gnupg-1.3.3.tgz (19,141 bytes)
......done: 19,141 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
building in /tmp/pear/temp/pear-build-rootMGeDnwmXYN/gnupg-1.3.3
running: /tmp/pear/temp/gnupg/configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... yes
checking build system type... x86_64-unknown-openbsd5.5
checking host system type... x86_64-unknown-openbsd5.5
checking target system type... x86_64-unknown-openbsd5.5
checking for PHP prefix... /var/www/pear
checking for PHP includes... -I/usr/local/share/php-5.4/include -I/usr/local/share/php-5.4/include/main -I/usr/local/share/php-5.4/include/TSRM -I/usr/local/share/php-5.4/include/Zend -I/usr/local/share/php-5.4/include/ext -I/usr/local/share/php-5.4/include/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php-5.4/modules
checking for PHP installed headers prefix... /usr/local/share/php-5.4/include
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking for gnupg support... yes, shared
checking for gnupg files in default path... found in /usr/local/include
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
ERROR: `/tmp/pear/temp/gnupg/configure' failed
History of my command line is below:
$ vagrant init tmatilai/openbsd-5.5
$ vagrant up
$ vagrant ssh
### after login ###
$ sudo su
# pkg_add php-5.4.24 pear gnupg-1.4.16 gpgme libgpg-error autoconf-2.69p1 automake-1.14.1
# export AUTOCONF_VERSION=2.69
# export AUTOMAKE_VERSION=1.14
# ln -s /usr/local/bin/php-5.4 /usr/local/bin/php
# ln -s /usr/local/bin/phpize-5.4 /usr/local/bin/phpize
# ln -s /usr/local/bin/php-config-5.4 /usr/local/bin/php-config
# pear upgrade pear
# pecl install apc # this is ok
# pecl install gnupg # error occurs
Also, I tried to manual compilation and had same error.
# mkdir /usr/local/src
# cd /usr/local/src
# pecl download gnupg
# tar zxf gnupg-1.3.3.tgz
# cd gnupg-1.3.3
# phpize
# ./configure # configure: error: wrong gpgme lib version or lib not found
gpgme might be installed.
# gpgme-config --version
1.3.1
# ldconfig -r | grep gpgme
63:-lgpgme-pthread.18.0 => /usr/local/lib/libgpgme-pthread.so.18.0
69:-lgpgme.18.0 => /usr/local/lib/libgpgme.so.18.0
# find / -name "*gpgme*"
/usr/local/bin/gpgme-config
/usr/local/info/gpgme.info-1
/usr/local/info/gpgme.info-2
/usr/local/info/gpgme.info
/usr/local/lib/libgpgme.a
/usr/local/lib/libgpgme.la
/usr/local/lib/libgpgme-pthread.so.18.0
/usr/local/lib/libgpgme.so.18.0
/usr/local/lib/libgpgme-pthread.a
/usr/local/lib/libgpgme-pthread.la
/usr/local/include/gpgme.h
/usr/local/share/aclocal/gpgme.m4
/var/db/pkg/gpgme-1.3.1p0
Does anyone know how to install PECL::gnupg in OpenBSD 5.5?
In config.m4, remove "-ldl". It's not needed on FreeBSD and I suspect it's the same on OpenBSD.
Also, I had to use the following command line on FreeBSD:
./configure --with-gnupg=/usr/local LDFLAGS="-L/usr/local/lib"
Someone using OpenBSD used the following
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
Related
Running pecl install yaml errors out with configure: error: ‘yaml.h’ header not found
I have PHP 7.4.14 installed via Homebrew brew install php#7.4
along with libyaml brew install libyaml but still see this same error.
I also tried reinstalling xcode dev tools, as well as running pecl with sudo and all still the same error every time. Full output from pecl below.
Starting to download yaml-2.2.1.tgz (40,977 bytes)
............done: 40,977 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
Please provide the prefix of libyaml installation [autodetect] :
building in /private/tmp/pear/temp/pear-build-mattfergusonRvLour/yaml-2.2.1
running: /private/tmp/pear/temp/yaml/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-yaml
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin20.2.0
checking host system type... x86_64-apple-darwin20.2.0
checking target system type... x86_64-apple-darwin20.2.0
checking for PHP prefix... /usr/local/Cellar/php#7.4/7.4.14
checking for PHP includes... -I/usr/local/Cellar/php#7.4/7.4.14/include/php -I/usr/local/Cellar/php#7.4/7.4.14/include/php/main -I/usr/local/Cellar/php#7.4/7.4.14/include/php/TSRM -I/usr/local/Cellar/php#7.4/7.4.14/include/php/Zend -I/usr/local/Cellar/php#7.4/7.4.14/include/php/ext -I/usr/local/Cellar/php#7.4/7.4.14/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php#7.4/7.4.14/pecl/20190902
checking for PHP installed headers prefix... /usr/local/Cellar/php#7.4/7.4.14/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable LibYAML suppot... yes, shared
checking for yaml headers... found in /usr/local
checking for ANSI C header files... no
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... no
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... no
checking for stdint.h... no
checking for unistd.h... yes
checking yaml.h usability... no
checking yaml.h presence... no
checking for yaml.h... no
configure: error: ‘yaml.h’ header not found
ERROR: `/private/tmp/pear/temp/yaml/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-yaml’ failed
maybe you should check this.
Please provide the prefix of libyaml installation [autodetect] :
today I got the same thing.
I try input libyaml prefix solved.
here is the steps:
step 1
$brew uninstall libyaml
Uninstalling /opt/homebrew/Cellar/libyaml/0.2.5... (10 files, 369.7KB)
step 2
$brew install libyaml
==> Downloading https://github.com/yaml/libyaml/archive/0.2.5.tar.gz
Already downloaded: /Users/**/Library/Caches/Homebrew/downloads/688fdcea5b88140cb83d1f72e3a77fa76b6560f0d66eabcea7d54cf9f06d5e72--libyaml-0.2.5.tar.gz
==> ./bootstrap
==> ./configure --prefix=/opt/homebrew/Cellar/libyaml/0.2.5
==> make install
🍺 /opt/homebrew/Cellar/libyaml/0.2.5: 10 files, 369.7KB, built in 12 seconds
step3 copy the prefix in step2.
#In this case,It's
/opt/homebrew/Cellar/libyaml/0.2.5
step4
$sudo pecl install yaml
Password:
downloading yaml-2.2.1.tgz ...
Starting to download yaml-2.2.1.tgz (40,977 bytes)
............done: 40,977 bytes
8 source files, building
running: phpize
Configuring for:
PHP Api Version: 20160303
Zend Module Api No: 20160303
Zend Extension Api No: 320160303
Please provide the prefix of libyaml installation [autodetect] :
step5
Paste the message you copied in step3, Press return.
Please provide the prefix of libyaml installation [autodetect] : /opt/homebrew/Cellar/libyaml/0.2.5
at last.success.
After installing libyaml with brew, copy the path to libyaml and paste it when pecl asks for prefix.
In my case, prefix was: /opt/homebrew/Cellar/libyaml/0.2.5
ERROR: /private/tmp/pear/temp/mcrypt/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-mcrypt failed.
Solution:
1.) mac install mcrypt:
brew install mcrypt or pecl install mcrypt
2.) mac install yaml:
brew install libyaml or pecl install yaml
Pro test is effective.
I have tried to install v8js on my ubuntu 16.04 for PHP/Symfony development.
I think I have installed all of requirements to install v8js, but it fails.
Based on the error, I will proper version of g++ should be installed on the machine.
So I have tried to install g++ by apt-get install g++, but I get another error as below.
root#localhost:~# echo '' | pecl install v8js-1.4.1
downloading v8js-1.4.1.tgz ...
Starting to download v8js-1.4.1.tgz (99,318 bytes)
......................done: 99,318 bytes
28 source files, building
running: phpize
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
Please provide the installation prefix of libv8 [autodetect] : building in /tmp/pear/temp/pear-build-rootAP7rkZ/v8js-1.4.1
running: /tmp/pear/temp/v8js/configure --with-php-config=/usr/bin/php-config --with-v8js
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
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib
checking for PHP extension directory... /usr/lib/php/20151012
checking for PHP installed headers prefix... /usr/include/php/20151012
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for V8 Javascript Engine... yes, shared
checking for V8 files in default path... found in /usr
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/tmp/pear/temp/pear-build-rootAP7rkZ/v8js-1.4.1':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details
ERROR: `/tmp/pear/temp/v8js/configure --with-php-config=/usr/bin/php-config --with-v8js' failed
root#localhost:~# apt-get install g++
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
g++ : Depends: g++-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Question is how am I need to install g++ or just how to install v8js on my machine.
I will put the output at installing
Can anyone help me please?
I want to use PDFlib to add an image to an existing pdf. I'm currently testing my site on Bitnami mampstack-5.6.19-0, but PDFlib is not installed with this stack.
I've tried following the instructions in this post and adapting them to a Mac environment, but now luck
I updated my local php's pdflib using macports so I can give pecl the path to pdflib.h
This is a printout of the error get when running pecl install pdflib
bash-3.2$ sudo pecl install pdflib
downloading pdflib-3.0.4.tgz ...
Starting to download pdflib-3.0.4.tgz (27,043 bytes).........done: 27,043 bytes
7 source files, building
WARNING: php_bin /Applications/mampstack-5.6.19-0/php/bin/php appears to have a suffix /bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20131106
Zend Module Api No: 20131226
Zend Extension Api No: 220131226
path to pdflib installation? : Downloads/pdflib/opt/local/include
building in /private/tmp/pear/temp/pear-build-rootzX8tkK/pdflib-3.0.4
running: /private/tmp/pear/temp/pdflib/configure --with-pdflib=Downloads/pdflib/opt/local/include
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin14.5.0
checking host system type... x86_64-apple-darwin14.5.0
checking target system type... x86_64-apple-darwin14.5.0
checking for PHP prefix... /Applications/mampstack-5.6.19-0/php
checking for PHP includes... -I/Applications/mampstack-5.6.19- 0/php/include/php -I/Applications/mampstack-5.6.19-0/php/include/php/main -I/Applications/mampstack-5.6.19-0/php/include/php/TSRM -I/Applications/mampstack-5.6.19-0/php/include/php/Zend -I/Applications/mampstack-5.6.19-0/php/include/php/ext -I/Applications/mampstack-5.6.19-0/php/include/php/ext/date/lib
checking for PHP extension directory... /Applications/mampstack-5.6.19-0/php/lib/php/extensions
checking for PHP installed headers prefix... /Applications/mampstack-5.6.19-0/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for PDFlib support... yes, shared
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C++ preprocessor... g++ -E
configure: error: pdflib.h not found! Check the path passed to --with-pdflib=<PATH>. PATH should be the install prefix directory.
ERROR: `/private/tmp/pear/temp/pdflib/configure --with-pdflib=Downloads/pdflib/opt/local/include' failed
bash-3.2$
Bitnami developer here,
You can install PDFlib on your MAMP Stack following the steps below:
Download PDFlib
$ cd /path/to/your/home/Downloads
$ wget http://www.pdflib.com/binaries/PDFlib/705/PDFlib-Lite-7.0.5p3.tar.gz
Uncompress it
$ tar -xzf PDFlib-Lite-7.0.5p3.tar.gz
$ cd PDFlib-Lite-7.0.5p3
Build it
$ ./configure
$ sudo make
$ sudo make install
Install via pecl
$ pecl install pdflib
It will add pdf.so to your extensions folder, so you should check where it adds it. Taking into account your installdir, it should be /Applications/mampstack-5.6.19-0/php/lib/php/extensions/pdf.so.
Finally, you have to add this line to your `/Applications/mampstack-5.6.19-0/php/etc/php.ini:
extension=pdf.so
And restart Apache and php-fpm:
/Applications/mampstack-5.6.19-0/ctlscript.sh restart apache
/Applications/mampstack-5.6.19-0/ctlscript.sh restart php-fpm
You can check that the extension is loaded executing this command:
php -i | grep PDF
I'm running CENTOS 6.7 and Apache and PHP 5.4.x. I'm using the EPEL and REMI repositories. I'm trying to install the libsodium extension.
It is my understanding that I need to install libsodium first, then the extension. Based on Googling, to get the right version, I ended on:
yum --enablerepo=remi install php54-php-pecl-libsodium
and I get the following result:
Installed:
php54-php-pecl-libsodium.x86_64 0:1.0.5-1.el6.remi
Dependency Installed:
audit-libs-python.x86_64 0:2.3.7-5.el6
environment-modules.x86_64 0:3.2.10-2.el6
libcgroup.x86_64 0:0.40.rc1-17.el6_7
libselinux-python.x86_64 0:2.0.94-5.8.el6
libsemanage-python.x86_64 0:2.0.43-5.1.el6
php54-php-common.x86_64 0:5.4.45-7.el6.remi
php54-runtime.x86_64 0:2.1-4.el6.remi
policycoreutils-python.x86_64 0:2.0.83-24.el6
setools-libs.x86_64 0:3.3.7-4.el6
setools-libs-python.x86_64 0:3.3.7-4.el6
tcl.x86_64 1:8.5.7-6.el6
Then I type in:
pecl install libsodium
and I get:
[root#core3 tmp]# pecl install libsodium
downloading libsodium-1.0.5.tgz ...
Starting to download libsodium-1.0.5.tgz (169,801 bytes)
.....................................done: 169,801 bytes
9 source files, building
running: phpize
Configuring for:
PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525
building in /var/tmp/pear-build-rootAHK93D/libsodium-1.0.5
running: /var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config
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
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib
checking for PHP extension directory... /usr/lib64/php/modules
checking for PHP installed headers prefix... /usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for libsodium support... yes, shared
checking for libsodium files in default path... not found
configure: error: Please install libsodium - See https://github.com/jedisct1/libsodium
ERROR: `/var/tmp/libsodium/configure --with-php-config=/usr/bin/php-config' failed
You can see the error seems to indicate that libsodium is not installed when it is. Am I missing a step?
php54-php-pecl-libsodium is a SCL package (for parallel installation).
You probably need php-pecl-libsodium.
yum --enablerepo=remi install php-pecl-libsodium
You don't need to run the "pecl install comand".
It's been a while since I've installed a PECL module, but I believe that running the initial command would have taken care of installing the module, no need to run pecl manually after that.
Indeed, we can see that the file list from rpm shows the module installed along with a php.ini file to include it.
$ rpm -qlp http://rpms.famillecollet.com/store/php54/php/pecl/libsodium/1.0.5/php54-php-pecl-libsodium-1.0.5-1.el6.remi.x86_64.rpm
/opt/remi/php54/root/etc/php.d/libsodium.ini
/opt/remi/php54/root/usr/lib64/php/modules/libsodium.so
/opt/remi/php54/root/usr/share/doc/pecl/libsodium
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/LICENSE
/opt/remi/php54/root/usr/share/doc/pecl/libsodium/README.md
/opt/remi/php54/root/var/lib/pear/pkgxml/php54-php-pecl-libsodium.xml
Did you make sure to restart your web server?
I am trying to install gnupg on a mac using PECL.
sudo pecl install gnupg
downloading gnupg-1.3.3.tgz ...
Starting to download gnupg-1.3.3.tgz (19,141 bytes)
......done: 19,141 bytes
5 source files, building
WARNING: php_bin /Applications/MAMP/bin/php/php5.5.3/bin/php appears to have a suffix /php5.5.3/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20121113
Zend Module Api No: 20121212
Zend Extension Api No: 220121212
building in /private/tmp/pear/install/pear-build-rootj1cVj1/gnupg-1.3.3
running: /private/tmp/pear/install/gnupg/configure
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /opt/local/bin/gsed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin12.4.0
checking host system type... x86_64-apple-darwin12.4.0
checking target system type... x86_64-apple-darwin12.4.0
checking for PHP prefix... /Applications/MAMP/bin/php/php5.5.3
checking for PHP includes... -I/Applications/MAMP/bin/php/php5.5.3/include/php -I/Applications/MAMP/bin/php/php5.5.3/include/php/main -I/Applications/MAMP/bin/php/php5.5.3/include/php/TSRM -I/Applications/MAMP/bin/php/php5.5.3/include/php/Zend -I/Applications/MAMP/bin/php/php5.5.3/include/php/ext -I/Applications/MAMP/bin/php/php5.5.3/include/php/ext/date/lib
checking for PHP extension directory... /Applications/MAMP/bin/php/php5.5.3/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /Applications/MAMP/bin/php/php5.5.3/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for gnupg support... yes, shared
checking for gnupg files in default path... not found
configure: error: Please reinstall the gpgme distribution
ERROR: `/private/tmp/pear/install/gnupg/configure' failed
I have narrowed down my problem to getting gpgme installed, but I can't find the correct way to to do it anywhere.
I was facing the same problem, when using PHP 5.4.24, Mac OSX 10.9.3. I had to take the following steps to install gnupg (v1.3.3) using PECL.
Firstly, I installed the software packages gnupg and gpgme using homebrew. Homebrew installs your packages in /usr/local. This is import because the gnupg PECL module searches the following locations /usr/local/include /usr/include /usr/local/include/gpgme/ /usr/include/gpgme/ to detect an installation of gpgpme.
Secondly, I tried to install gnupgp using PECL:
pecl install gnupg
At time writing, the code of the PECL module contains two statement that prevents the module from being compiled and linked correctly. This resulted into the following error:
...compile statements...
cc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o .libs/gnupg.so -bundle .libs/gnupg.o .libs/gnupg_keylistiterator.o -L/usr/local/include/lib -lgpgme -Wl,-rpath -Wl,/usr/local/include/lib
ld: warning: directory not found for option '-L/usr/local/include/lib'
duplicate symbol _gnupg_keylistiterator_class_entry in:
.libs/gnupg.o
.libs/gnupg_keylistiterator.o
duplicate symbol _gnupg_class_entry in:
.libs/gnupg.o
.libs/gnupg_keylistiterator.o
ld: 2 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [gnupg.la] Error 1
Thirdly, I had to resolve this error by editing and installing the PECL module by hand, based on Jim Jagielski's patch. These are the steps I completed:
Download the gnupg-pecl module:
pecl download gnupg
Unpack the gnupg-pecl module:
tar xvf gnupg-1.3.3.tgz
Change directory:
cd gnupg-1.3.3
Modify php_gnupg.h by changing line 49:
zend_class_entry *gnupg_class_entry; into static zend_class_entry *gnupg_class_entry;
Modify php_gnupg_keylistiterator.h by changing line 44:
zend_class_entry *gnupg_keylistiterator_class_entry; into static zend_class_entry *gnupg_keylistiterator_class_entry;
Step 4 and 5 are not required on gnupg-1.4.0 or greater.
Prepare the PHP module for compiling, run:
phpize
Configure the module:
./configure
Build the module:
make
Install the module:
make install
After compiling the module was installed in /Users/USERNAME/tmp/pear/install/gnupg-1.3.3/module. Because the PHP shared extensions are installed in /usr/lib/php/extensions/no-debug-non-zts-20100525/, I copied the module:
cp /Users/USERNAME/tmp/pear/install/gnupg-1.3.3/modules/gnupg.so /usr/lib/php/extensions/no-debug-non-zts-20100525/
Add the extension to PHP. Therefore open /etc/php.ini and add the following lines:
[gnupg]
extension=gnupg.so
Test the extension, by executing the following line:
php -r "print_r(new gnupg());"
Remember this is building from source, so you need the gpgme headers in order to compile the extension. So, look for the dev version of that package:
In Linux where I had the same problem that is:
gpgme-devel