gnupg for PHP on OSX - php

I'm trying to set up gnupg for use in PHP on my mac.
I have tried following the directions found at the following links:
http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/
Install PHP gnupg using PECL on MAC/MAMP 10.8.4
What I seem to be running into with both is this message:
checking for gpgme_check_version in -lgpgme... no
configure: error: wrong gpgme lib version or lib not found
I see this when executing the './configure' command.
I have installed gpgme using Homebrew.
I'm a bit stuck as I've tried everything I can come up with and haven't had any luck.
I am running PHP 5.6.7 on OSX 10.10.2 using MAMP Pro.
Thank you in advance for any help you can provide.
EDIT:
My original question was unclear, so I'll try again.
I am trying to install gnupg for use in PHP in my dev environment, which is a macbook using MAMP.
I fist installed gpgme and gnpug using Homebrew, both with no issues.
Then I attempted to install gnupg using pecl via the following command
sudo pecl install gnupg
And I end up with this error message
configure: error: wrong gpgme lib version or lib not found
ERROR: `/private/tmp/pear/install/gnupg/configure' failed
I have tried editing my path with no success, adding usr/local/include and usr/local/lib, where gpgme.h and libgpgme.a files can be found. I see no change in the error message.
EDIT 2:
I believe that gpgme is being installed correctly and pecl is able to find it. I install it using the following command
brew install gpgme
If I then run the pecl command to install gnupg, I get the error message above.
Now, if I execute the brew command to uninstall gpgme
brew uninstall gpgme
I see the following error message when trying to install gnupg with pecl
configure: error: Please reinstall the gpgme distribution
ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
which seems to indicate that the library is installing and being found, but it's an incorrect version.
I am unable to find any information on what version is required for pecl to install gnupg.
EDIT 3:
Looking at the terminal a little more, I see that it's failing to find a specific function (gpgme_check_version) in the lib file.
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

I'm not entirely sure what happened, but I believe my installation of autoconf was somehow compromised.
What ended up solving my problem was using brew to uninstall autoconf and gpgme, then using brew to reinstall both packages.

Related

Fail pecl channel-update pecl.php.net

My develop environment
CentOS: 7.9 (Using FROM centos:7.9.2009 From DockerHub)
PHP: 7.4.33
Apache: 2.4.55
I'm trying to create Docker container by using Dockerfile. With the above environment, I tried to install Xdebug:
RUN pecl install xdebug-3.1.6
But received message
No releases available for package "example.net/xdebug" install failed.
On internet, they said I need to update pecl with this command:
pecl channel-update pecl.php.net
But it failed and I received the following error message:
I can't understand that suggestion Trying channel "example.net" over https:// instead.
Should I put some options to use https://? Is there such an option?
I really tired to search the solution about this, there's no solution.
Someone who experienced that error, please give me some advice to solve... Thanks.

How to install PHP extension using PECL (with Homebrew)

I try to install amqp php extension on my mac using brew.
Enviroment: MacOS Catalina 10.15.6,
Homebrew 2.5.0, PHP 7.4.10, rabbitmq 3.8.8, rabbitmq-c 0.10.0
I got following messages after executing: pecl install amqp
checking for pkg-config... /usr/local/bin/pkg-config
checking for amqp using pkg-config... configure: error: librabbitmq not found
ERROR: `/private/tmp/pear/temp/amqp/configure --with-php-config=/usr/local/opt/php/bin/php-config --with-librabbitmq-dir' failed
Any ideas how to solve this problem.
For anyone with similar problem.
For the question:
Set the path to librabbitmq install prefix [autodetect] :
do not leave empty answer (autodetect).
In my case, setting this value to
/usr/local/Cellar/rabbitmq-c/0.10.0
do the job.

Installing mcrypt on mac php 7.1.16

I need to set up a magento site locally but during installation I'm getting the error 'PHP extension "mcrypt" must be loaded.' I then checked for the extension by doing php -m and noted the extension isn't there.
I then tried to install it with brew install php71-mcrypt which didn't work so I tried brew install mcrypt #php71-mcrypt but I'm getting the error 'Error: No available formula with the name "#php71-mcrypt"'.
Anybody know how to get this installed or how to bypass the error for the magento installation?
In case it helps anybody else I solved the issue by using a different php version for mamp!

problems with php mcrypt mac 10.8 install

I'm having some issues with getting mcrypt setup on my local php server. I initially tried to use homebrew, but when calling a mcrypt function, it said that it errored saying that the function was unavailable.
I tried troubleshooting a bit, but I think I accidently added mcrypt to a place other than the homebrew installed php, and now I can't seem to uninstall it, and now I can't seem to install mcrypt through homebrew anymore. I get the following error:
{php-5.3.27 tim$ brew install mcrypt
==> Downloading http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/
Already downloaded: /Library/Caches/Homebrew/mcrypt-2.5.8.tar.gz
==> ./configure --prefix=/usr/local/Cellar/mcrypt/2.5.8 --mandir=/usr/local/Cell
==> make install
Warning: Could not link mcrypt. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link mcrypt'
Possible conflicting files are:
==> Summary
🍺 /usr/local/Cellar/mcrypt/2.5.8: 12 files, 348K, built in 26 seconds}
any help would be great
thanks
The following command of ./configure is make.
and, next is make install.
./configure
make
make install

Error installing MongoDb PHP driver with XAMPP on Max OS Lion

I get this error when i try to run following command
sudo pecl install mongo
Error:
...php_mongo.c:22:10: fatal error: 'php.h'
file not found
#include <php.h>
^
1 error generated.
make: *** [php_mongo.lo] Error 1
ERROR: `make' failed
I am new to MAC, please help me to resolve this and get Mongo Working with PHP.
I have installed MacPorts and autoconf
It seems, that you did not install the xampp "Developer Package", required to build additional php extension. You can download the "Developer Package" from:
http://www.apachefriends.org/en/xampp-macosx.html#849
This has already been answered.
Please follow the processes outlined in this answer - Install PECL on Mac OS X 10.6.
I followed the process outlined here http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/, referenced by the above Stackoverflow link and the process for install pear, followed by pecl and subsequently -
sudo pecl install mongo
works perfectly on OSX Lion.
You may need to modify the extensions in /etc/php.ini, however, this is explained in the output after you install the php mongo driver.
It took me the whole day to find this answer, I had tried everything, but this worked finally:
sudo C_INCLUDE_PATH=/usr/local/opt/openssl/include /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
I found this article very helpful. Saved a lot of time after I wasted a lot of time to check other links. I did for MAMP and think will work for XAMPP too.
The thing is MAMP does not ship with all PHP sources to compile pecl mongo file and create mongo.so. All what you need is download php for respective version you are using. I was using php version 5.6.10. I checked php.net site that was having 5.6.13 version. I downloaded sources for this version from PhP.net. Executed "sudo pecl install mongo" again and it worked.

Categories