Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Installing gnupg php module

Discussion in 'General Discussion' started by laraweb, Apr 21, 2011.

  1. laraweb

    laraweb Registered

    Apr 21, 2011
    Likes Received:
    Trophy Points:

    I've been wanting to install the Gnupg module in php on my Cpanel Centos server. I have done this through the SSH connection directly on the server's console. Problem is that although everything seems to be going fine, right at the end the installation ends with an error:

    root@server [/usr/src/gpgme-1.3.0]# pecl install gnupg
    downloading gnupg-1.3.2.tgz ...
    Starting to download gnupg-1.3.2.tgz (18,237 bytes)
    ......done: 18,237 bytes
    5 source files, building
    running: phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626
    building in /var/tmp/pear-build-root/gnupg-1.3.2
    running: /root/tmp/pear/gnupg/configure
    checking for egrep... 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 ANSI C... 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/local
    checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
    checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20090626
    checking for PHP installed headers prefix... /usr/local/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 gnupg support... yes, shared
    checking for gnupg files in default path... not found
    configure: error: Please reinstall the gpgme distribution
    ERROR: `/root/tmp/pear/gnupg/configure' failed

    I have tried reinstalling gpgme as it suggests here but always end up in the same error. I guess the problem is the gnupg files in the default path not being found (and I don't know how to set that path).

    Any help would be appreciated.
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Have you reviewed this tutorial on installing it? It appears you'd have to install gpgme from source based on what it is saying:

    Install GNUPG PHP extension in Cpanel | Linux Sysadmin Blog

    You'd also need to add /usr/local/lib to /etc/ and run "ldconfig" afterward to add the path for the libraries to be detected.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. LinuxTechie

    LinuxTechie Well-Known Member

    Jan 22, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    if you are still facing issues download the source and install the extension using phpize.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. laraweb

    laraweb Registered

    Apr 21, 2011
    Likes Received:
    Trophy Points:
    Thanks cPanelTristan and LinuxTechie for your quick responses. I was following that same page (Install GNUPG PHP extension in Cpanel | Linux Sysadmin Blog) before and going line by line to see if I was doing anything wrong. LinuxTechie it seems my server does not have phpsize installed and apparently it is not advisable to install it (I have CentOs) The yum search command does not return any php related searches. But I did find a workaround, instead of installing a Pecl module, I found a PHP extension called Crypt_GPG and eventhough I do not have use of the Gnupg object I can finally encrypt using the Crypt_GPG library. Thanks guys.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice