首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpenBSD 5.5中无法安装PECL::gnupg

OpenBSD 5.5中无法安装PECL::gnupg
EN

Stack Overflow用户
提问于 2014-08-19 09:38:53
回答 1查看 558关注 0票数 0

我使用的是OpenBSD5.5(带有vagrant box: OpenBSD /openbsd-5.5)。我用pkg_add命令安装了php、pear和gnupg。另外,我使用pecl命令安装了PECL::APC。

但是,当我尝试使用pecl命令(Pecl install gnupg)安装PECL::gnupg时,安装失败并显示以下消息。

代码语言:javascript
复制
# 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

我的命令行的历史记录如下:

代码语言:javascript
复制
$ 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

此外,我尝试手动编译,但也出现了同样的错误。

代码语言:javascript
复制
# 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。

代码语言:javascript
复制
# 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吗?

EN

回答 1

Stack Overflow用户

发布于 2015-06-09 21:46:58

在config.m4中,删除"-ldl“。在FreeBSD上是不需要的,我猜在OpenBSD上也是一样的。

此外,我还必须在FreeBSD上使用以下命令行:

代码语言:javascript
复制
./configure --with-gnupg=/usr/local LDFLAGS="-L/usr/local/lib"

使用OpenBSD的用户使用了以下内容

代码语言:javascript
复制
./configure CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25374452

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档