OSX Big Sur unable to install php 7.4 intl - php

I am getting crazy since days as my new MacBook OS X Big Sur with php#7.4 is giving issues to XAMPP.
As far as I understood it's better to use the php from OS X than from XAMPP, but I am getting error while trying to install intl using brew. Here my code:
sudo pecl install intl
When I run the above I get this warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20190902/intl (dlopen(/usr/local/lib/php/pecl/20190902/intl, 9): image not found), /usr/local/lib/php/pecl/20190902/intl.so (dlopen(/usr/local/lib/php/pecl/20190902/intl.so, 9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/lib/php/pecl/20190902/intl (dlopen(/usr/local/lib/php/pecl/20190902/intl, 9): image not found), /usr/local/lib/php/pecl/20190902/intl.so (dlopen(/usr/local/lib/php/pecl/20190902/intl.so, 9): image not found)) in Unknown on line 0
downloading intl-3.0.0.tgz ..
then I am asked about path for ICU.
Specify where ICU libraries and headers can be found [DEFAULT] :
I press ENTER and I get this:
running: /private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-icu-dir=DEFAULT
Then the installation starts, but at the end I get this error:
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
No package 'icu-uc' found
No package 'icu-io' found
No package 'icu-i18n' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
ERROR: `/private/tmp/pear/temp/intl/configure --with-php-config=/usr/local/opt/php#7.4/bin/php-config --with-icu-dir=DEFAULT' failed
If I make:
which php
I get:
/usr/local/opt/php#7.4/bin/php
Anyone able to give real solution?
thanks!

Related

How to install PDO_PGSQL for PHP 8 on Mac OS Big Sur having M1 Chip?

I have been trying to install pdo_pgsql. Homebrew is not working. Adminer needs this extension for accessing the DB. How to solve the issue?
PgSQL and PDO_PgSQL extensions are already enabled on the php.ini file. But, still, Adminer shows the Error:
None of the supported PHP extensions (PgSQL, PDO_PgSQL) are available.
When running $ php artisan serve, it shows the following error
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql, 9): image not found), /opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so (dlopen(/opt/homebrew/lib/php/pecl/20190902/pdo_pgsql.so, 9): image not found)) in Unknown on line 0

Cannot install INTL extension with XAMPP on Mac

When I wrote sudo pecl install intl command on terminal I get the following error.
My path is Applications/XAMPP/xamppfiles/bin/php.
I wrote extension=intl.so in php.ini file in etc.
Warning: PHP Startup: Unable to load dynamic library 'intl.so' (tried: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so, 9): Symbol not found: _zend_string_init_interned
Referenced from: /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so
in /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so), /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so.so (dlopen(/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20170718/intl.so.so, 9): image not found)) in Unknown on line 0
Can someone help ?

Apache 2.4 PHP Startup: Unable to load dynamic library 'curl.so', libcurl.4.dylib

I'm running macOS 10.12, Apache 2.4, and PHP 7.2.7
When I add the line: LoadModule php5_module libexec/apache2/libphp5.so
to my httpd.conf I get the following errors.
httpd not running, trying to start
Warning: PHP Startup: Unable to load dynamic library 'curl.so'
(tried:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so
(dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so,
9): Library not loaded: /usr/local/php5/lib/libcurl.4.dylib
Referenced from:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so
Reason: Incompatible library version: curl.so requires version 9.0.0
or later, but libcurl.4.dylib provides version 7.0.0),
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so.so
(dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/curl.so.so,
9): image not found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so'
(tried:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so
(dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so,
9): Library not loaded: /usr/local/php5/lib/libcurl.4.dylib
Referenced from:
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so
Reason: Incompatible library version: http.so requires version 9.0.0
or later, but libcurl.4.dylib provides version 7.0.0),
/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718//usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so.so
(dlopen(/usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718//usr/local/php5/lib/php/extensions/no-debug-non-zts-20170718/http.so.so,
9): image not found)) in Unknown on line 0
/usr/sbin/apachectl: line 92: 719 Segmentation fault: 11 $HTTPD "$#"
I updated curl with brew and it shows:
/usr/local/php5/lib/libcurl.4.dylib (compatibility version 9.0.0, current version 9.0.0)
I still get the same error.
Why is the error showing libcurl.4.dylib provides version 7.0.0 when it is version 9.0.0? Is it pointing to an older version of the file? They both show this location /usr/local/php5/lib/libcurl.4.dylib
Thanks for your help.
it basically reads:
requires version 9.0.0 or later, but *.dylib provides version 7.0.0
this means, you have to install these libraries at version 9.0.0, instead of version 7.0.0.
it's also strange that dlopen() complains about filename suffix .so.so
I finally found a solution that works.
$ brew install httpd php72
I followed the instructions to setup the httpd.conf file and the php.ini file and Apache starts fine now.

Error Installing composer with Homebrew

I have just installed Composer on my mac OSX 10.12.1 using Homebrew:
brew install homebrew/php/composer
Then when I call
brew info homebrew/php/composer
It shows this:
homebrew/php/composer: stable 1.3.0 (bottled), HEAD
Dependency Manager for PHP
http://getcomposer.org
/usr/local/Cellar/composer/1.3.0 (5 files, 1.7M) *
Poured from bottle on 2017-01-08 at 16:33:31
From: https://github.com/Homebrew/homebrew-php/blob/master/Formula/composer.rb
==> Requirements
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): image not found in Unknown on line 0
Required: phpmeta ✔, phar ✔
How can this be fixed?
You have an issue with your PHP installation.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so' - dlopen(/usr/local/Cellar/php71/7.1.0_11/lib/php/extensions/no-debug-non-zts-20160303/mongodb.so, 9): image not found in Unknown on line 0
Check MongoDB extension. Maybe you've removed it, but the config still includes it (check all files in /usr/local/etc/php/7.1/conf.d/).
I fixed it. It wasn't a composer issue, Trying to install Composer just alerted me to the problem. As you say it was a PHP configuration problem with mongodb. I fixed it by removing the mongodb extension from my PHP.ini file.

MongoDB PHP Driver Install (OS X El Capitan)

I've been wrestling with the MongoDB PHP Driver install for most of this afternoon.
I'm using PHP version 5.5, and I've installed the MongoDB PHP Driver using brew install php55-mongo (although I tried other methods before). The problem is, whenever I try to use MongoClient() I get the error:
Class 'MongoClient' not found
The module "mongo" is listed when I run php -m, but I also get the following warnings:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so' - dlopen(/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so' - dlopen(/usr/local/Cellar/php55/5.5.34/lib/php/extensions/no-debug-non-zts-20121212/mongo.so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php55-mongodb/mongodb.so' - dlopen(/usr/local/opt/php55-mongodb/mongodb.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php55-mongodb/mongodb.so' - dlopen(/usr/local/opt/php55-mongodb/mongodb.so, 9): image not found in Unknown on line 0
The module isn't listed when I use phpinfo() or get_loaded_extensions().
Any ideas?
Check which php mongo driver you have installed. It seems like you have installed new php mongo driver and for that you need to add mongodb.so extension instead of mongo.so also you
As reffered in PHP manual
The MongoClient class
(PECL mongo >=1.3.0)
Warning
This extension that defines this class is deprecated. Instead, the MongoDB extension should be used. Alternatives to this class include:
MongoDB\Driver\Manager

Categories