douwen7331 2016-06-20 12:28
浏览 156

OSX上的gnupg和gpgme lib版本错误

I for heaven sake can't get gnupg installed on my OS Yosemite machine using pecl.

Objective:

Install gnupg module to be used in PHP to do PGP Encryption.

Installed Stuff so Far:

Installed gpgme using brew after installing autoconf. Neither brew nor autoconf was available on my machine. gpgme version installed is 1.6.0

Issue:

When I do sudo pecl install gnupg it tries to install it but quits at

configure: error: wrong gpgme lib version or lib not found

I am pasting full log below.

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

What I have tried so far:

  • I tried installing gnupg through brew command and it did installed fine but I can't use it in PHP.
  • Tried manually compiling gnupg using phpize and configure but they trigger same error when I run make command.

Please tell me how I can fix this version issue.

  • 写回答

1条回答 默认 最新

  • droos02800 2016-06-25 15:56
    关注

    brew install gnupg[2] does not install gpgme, which is a library for interfacing GnuPG and offered in another homebrew package. Also run brew install gpgme. Afterwards, you should find the GPGME library under /usr/local/include.

    Alternatively, if you install PHP through Homebrew, there are also GnuPG packages for PHP readily available:

    $ 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 
    
    评论

报告相同问题?

悬赏问题

  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答