【问题标题】:gnupg and gpgme lib version error on OSXOSX 上的 gnupg 和 gpgme lib 版本错误
【发布时间】:2016-06-20 12:28:29
【问题描述】:

看在上帝的份上,我无法使用 pecl 在我的 OS Yosemite 机器上安装 gnupg。

目标:

安装 gnupg 模块用于 PHP 进行 PGP 加密。

到目前为止已安装的东西:

安装 autoconf 后使用 brew 安装 gpgme。我的机器上既没有 brew 也没有 autoconf 。安装的 gpgme 版本是 1.6.0

问题:

当我执行sudo pecl install gnupg 时,它会尝试安装它,但会在

处退出
configure: error: wrong gpgme lib version or lib not found

我正在下面粘贴完整的日志。

sudo pecl install gnupg
Password:
downloading gnupg-1.3.6.tgz ...
Starting to download gnupg-1.3.6.tgz (19,273 bytes)
......done: 19,273 bytes
5 source files, building
running: phpize
Configuring for:
PHP Api Version:         20131106
Zend Module Api No:      20131226
Zend Extension Api No:   220131226
building in /private/tmp/pear/temp/pear-build-rootJfzyjJ/gnupg-1.3.6
running: /private/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... 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/XAMPP/xamppfiles
checking for PHP includes... -I/Applications/XAMPP/xamppfiles/include/php -I/Applications/XAMPP/xamppfiles/include/php/main -I/Applications/XAMPP/xamppfiles/include/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/ext -I/Applications/XAMPP/xamppfiles/include/php/ext/date/lib
checking for PHP extension directory... /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /Applications/XAMPP/xamppfiles/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... 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: `/private/tmp/pear/temp/gnupg/configure' failed

到目前为止我所做的尝试:

  • 我尝试通过 brew 命令安装 gnupg,它确实安装得很好,但我无法在 PHP 中使用它。
  • 尝试使用phpizeconfigure 手动编译gnupg,但是当我运行make 命令时它们会触发相同的错误。

请告诉我如何解决这个版本问题。

【问题讨论】:

    标签: php macos gnupg pecl gpgme


    【解决方案1】:

    brew install gnupg[2] 不安装gpgme,这是一个用于连接 GnuPG 并在另一个自制软件包中提供的库。同时运行brew install gpgme。之后,您应该会在/usr/local/include 下找到 GPGME 库。

    或者,如果您通过 Homebrew 安装 PHP,也有现成的用于 PHP 的 GnuPG 包:

    $ brew search gnupg
    gnupg
    gnupg-pkcs11-scd
    gnupg2                        
    homebrew/php/php53-gnupg
    homebrew/php/php55-gnupg
    homebrew/versions/gnupg21     
    homebrew/php/php54-gnupg
    homebrew/php/php56-gnupg 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      • 2016-10-03
      • 2012-11-16
      • 2023-04-06
      • 1970-01-01
      • 2019-07-04
      相关资源
      最近更新 更多