I am trying to install PHP using asdf on Ubuntu 20.04 LTS without success. While installing, it generates many errors regarding missing packages in the main installation like the absence of re2c, bison, libcurl, etc... I succeeded in install all these packages but now when I try to install PHP through asdf I am getting the following error:
checking for PQprepare in -lpq... no
configure: error: Unable to build the PDO PostgreSQL driver: a newer libpq is required
Anyone can help me to fix this problem?
PS.: I have PHP 7.4.3 installed in my system. I installed it through apt command.
Related
Before the question, I am running on Ubuntu 16.04. Upgrading is not an immediate option. I have installed php5.6 following the instructions in this article:
https://www.liquidweb.com/kb/install-multiple-php-versions-on-ubuntu-16-04/
Following those steps has worked in that phpinfo() shows 5.6, but when using phpmyadmin I get this error:
The mbstring extension is missing. Please check your PHP configuration.
After trying to install the package by itself
apt-get install php5.6-mbstring
I get this error:
E: Unable to locate package php5.6-mbstring
E: Couldn't find any package by glob 'php5.6-mbstring'
E: Couldn't find any package by regex 'php5.6-mbstring'
I have seen a lot of solutions, but none seem to fix this issue or are current.
Any help would be appreciated, or if this is something that can no longer be done that would good to know as well. Thanks!
We're using a MSSQL db at work and I want to be able to write PHP scripts that fetches data directly from the db to my local MAMP environment. I've tried installing pdo_sqlsrv and sqlsrv using Homebrew and I've tried compiling the extensions on my own using PECL commands, but in both cases it has ended unsuccessfully with the error message:
fatal error: 'sql.h' file not found
I've been googling this problem all day and can't seem to find a solution that I can get to work/understand. I'd be grateful for any help or hints.
Computer: Macbook Pro 2018 (macOS 10.13.6)
Local environment: MAMP PRO 4.5 (PHP version: 7.2.1)
I found the solution here: https://github.com/Microsoft/msphpsql/issues/198
I was missing tools provided by unixodbc, so:
brew install unixodbc
...provided the .h file(s) I was missing. The PECL installer was then able to locate the required libraries. In case it wouldn't have worked, I would have tried:
sudo CXXFLAGS="-I/usr/local/opt/unixodbc/include" LDFLAGS="-L/usr/local/lib" pecl install pdo_sqlsrv
sudo CXXFLAGS="-I/usr/local/opt/unixodbc/include" LDFLAGS="-L/usr/local/lib" pecl install sqlsrv
...as suggested in the link.
I installed mongodb php-driver as per the guideline shown here:
https://github.com/mongodb/mongo-php-driver
But when I run #php command its showing following error :
Warning: PHP Startup: Unable to load dynamic library
'/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so' -
/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mongodb.so: symbol
CRYPTO_get_locking_callback, version OPENSSL_1.0.0 not defined in file
libcrypto.so.1.0.0 with link time reference in Unknown on line 0
I am using :
Lampp Stack
PHP : 7.0.0
OS: Ubuntu 15.10
Pear: 1.10.1
Please suggest any solution if you have. Thanks in advance .
It looks like you don't have SSL library enabled/installed correctly on your system. Most likely, I am thinking you don't have the libssl-dev package installed.
You should install this with apt-get install libssl-dev libsasl2-dev, and then reinstall the mongodb extension with pecl uninstall mongodb && pecl install mongodb.
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.
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.