我使用的是OpenBSD5.5(带有vagrant box: OpenBSD /openbsd-5.5)。我用pkg_add命令安装了php、pear和gnupg。另外,我使用pecl命令安装了PECL::APC。
但是,当我尝试使用pecl命令(Pecl install gnupg)安装PECL::gnupg时,安装失败并显示以下消息。
# 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我的命令行的历史记录如下:
$ 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此外,我尝试手动编译,但也出现了同样的错误。
# 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。
# 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有人知道如何在OpenBSD 5.5中安装PECL::gnupg吗?
发布于 2015-06-09 21:46:58
在config.m4中,删除"-ldl“。在FreeBSD上是不需要的,我猜在OpenBSD上也是一样的。
此外,我还必须在FreeBSD上使用以下命令行:
./configure --with-gnupg=/usr/local LDFLAGS="-L/usr/local/lib"使用OpenBSD的用户使用了以下内容
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"https://stackoverflow.com/questions/25374452
复制相似问题