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.
Related
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!
since the late upgrade of homebrew i started getting these warning in the terminal even though the libraries exist and the config point to the correct path
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-apcu/apcu.so' - dlopen(/usr/local/opt/php70-apcu/apcu.so, 9): Symbol not found: _zend_signal_globals
Referenced from: /usr/local/opt/php70-apcu/apcu.so
Expected in: flat namespace
in /usr/local/opt/php70-apcu/apcu.so in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-apcu/apcu.so' - dlopen(/usr/local/opt/php70-apcu/apcu.so, 9): Symbol not found: _zend_signal_globals
Referenced from: /usr/local/opt/php70-apcu/apcu.so
Expected in: flat namespace
in /usr/local/opt/php70-apcu/apcu.so in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-intl/intl.so' - dlopen(/usr/local/opt/php70-intl/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.59.dylib
Referenced from: /usr/local/opt/php70-intl/intl.so
Reason: image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/opt/php70-intl/intl.so' - dlopen(/usr/local/opt/php70-intl/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.59.dylib
Referenced from: /usr/local/opt/php70-intl/intl.so
Reason: image not found in Unknown on line 0
PHP Warning: Module 'mcrypt' already loaded in Unknown on line 0
Warning: Module 'mcrypt' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/7.0
Loaded Configuration File: /usr/local/etc/php/7.0/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.0/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.0/conf.d/ext-apcu.ini,
/usr/local/etc/php/7.0/conf.d/ext-igbinary.ini,
/usr/local/etc/php/7.0/conf.d/ext-intl.ini,
/usr/local/etc/php/7.0/conf.d/ext-mcrypt.ini,
/usr/local/etc/php/7.0/conf.d/ext-memcached.ini,
/usr/local/etc/php/7.0/conf.d/ext-oauth.ini,
/usr/local/etc/php/7.0/conf.d/ext-opcache.ini,
/usr/local/etc/php/7.0/conf.d/ext-xdebug.ini
when executing which php
/usr/local/opt/php#7.0/bin/php
and here is the result of brew list
brew list ✔ 10956 12:18:48
apr libffi openssl#1.1 php#5.6
apr-util libmemcached pcre php#7.0
aspell libpng php55 php#7.1
autoconf libpq php55-intl pkg-config
automake libtool php55-mcrypt pv
composer libxml2 php56 python
dnsmasq libyaml php56-intl python#2
freetds libzip php56-mcrypt readline
freetype m4 php56-pcntl ruby
gdbm makedepend php70 sqlite
gettext mcrypt php70-apcu tmux
glib memcached php70-igbinary tree
gmp mhash php70-intl unixodbc
gnu-sed n98-magerun php70-mcrypt webp
heroku ncdu php70-memcached xz
icu4c nginx php70-oauth zsh
jpeg node php70-opcache zsh-syntax-highlighting
jq oniguruma php70-xdebug
libevent openssl php71
here is the output for brew doctor
brew doctor ✔ 10981 12:38:48
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!
Warning: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5m-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5-config
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3-config
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/ares.h
/usr/local/include/node/ares_build.h
/usr/local/include/node/ares_rules.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/nameser.h
/usr/local/include/node/openssl/archs/BSD-x86/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
/usr/local/include/node/openssl/des_old.h
/usr/local/include/node/openssl/dso.h
/usr/local/include/node/openssl/krb5_asn.h
/usr/local/include/node/openssl/kssl.h
/usr/local/include/node/openssl/pqueue.h
/usr/local/include/node/openssl/ssl23.h
/usr/local/include/node/openssl/ui_compat.h
/usr/local/include/node/pthread-fixes.h
/usr/local/include/node/v8-debug.h
/usr/local/include/node/v8-experimental.h
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
python#2
heroku
python
php55
Warning: Your Xcode (9.2) is outdated.
Please update to Xcode 9.4 (or delete it).
Xcode can be updated from the App Store.
Warning: Broken symlinks were found. Remove them with `brew prune`:
/usr/local/bin/docker-credential-osxkeychain.backup
/usr/local/bin/hyperkit.backup
/usr/local/bin/notary.backup
/usr/local/bin/vpnkit.backup
any help on how to fix these warnings is appreciated
For anyone looking how to solve this issue, you have to delete the php and related libraries and install again as homebrew/php tap became deprecated and all of the libraries used to install became part of homebrew/core.
so by default you will php7.2 installed when you do $ brew install php but you can you install specific version manually like php#7.0. if you need xdebug you can install with pecl install xdebug and add the path in your php.ini
I am trying to run a CakePHP app. I've been working for a while in this app and recently I had to install a new dependency (using composer). Once I installed it this error came up and I can't run the app anymore:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so, 9): Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.56.dylib
Referenced from: /usr/lib/php/extensions/no-debug-non-zts-20121212/intl.so Reason: image not found in Unknown on line 0
When I open that folder I can see a different version of that library:
libicui18n.57.dylib
But the system is looking for
libicui18n.56.dylib
How can I install the 56 version of that library or upgrade the intl so it uses version 57?
Is that what I need to do?
Thanks!!
I have the same question when i upgrade node to v8.x.
After i run brew upgrade node,the icu4c was updated.
I solve the problem by under command:
brew unlink php56-intl
brew remove php56-intl
brew install php56-intl
so, i feel you should reinstall intl extension.
I'm trying to install Laravel4 on my 10.6 Mac / PHP 5.4.14. And I seem to be going down a rabbit hole.
After "composer install"ing Laravel4 .. command line showed that I needed the Mcrypt PHP extension. So I tried to install that and I was told I had to have Mhash installed. So I installed Mhash .. then went back and installed Mcrypt
extension = mcrypt.so
Libraries have been installed in:
/Users/****/downloads/php-5.4.14/ext/mcrypt/modules
Then I went back to installing Laravel 4 and now I'm showing this
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): image not found in Unknown on line 0
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating autoload files
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/opt/local/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): image not found in Unknown on line 0
Laravel requires the Mcrypt PHP extension.
.. and I thought I had already taken care of that intl.so issue .. but it seems I installed an old version?
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Laravel requires the Mcrypt PHP extension.
So can someone maybe give me a bit of perspective on this and point me in the right direction? I'm a little fuzzy with compiling PHP.
Your command line might be using a different version of PHP. You'll have to update your path variable in your .bash_profile file to point to the correct version of PHP.
How are you installing PHP?
I'm thinking the 5.4 version you installed is getting mixed up with the built-in 5.3 version that comes with OS X.
I get this warning message in my php:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/sqlite.so' - /usr/lib64/php/modules/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0
How should I fix that? Where can I get this sqlite.so file?
You don't need to get it. Just remove the line referencing the shared object.
cd /etc/php5
grep -rinH sqlite .
Since PHP 5.4 sqlite is only available via PECL.
If you want to get the library, try sudo apt-get install php-sqlite or yum install php-sqlite or similar.
Two ideas: (Re-) install php-sqlite on your machine or remove the line which loads the sqlite.so. Mostly done by an extra config in /etc/php5/conf.d/
If you don't have shell access, call you system administrator and give him that error message.
The .so file was removed in Ubuntu 11.10 (bug report here), however you can still install it manually...
Download the old package: http://packages.ubuntu.com/natty-updates/php5-sqlite
Extracts sqlite.so to the required directory
Change it's ownership to root:root
you must have sure sqlite installed
goto /etc/php.d and find sqlite.ini
you must somethong like : extension=mysql.so
mysql.so must be in : /usr/lib64/php/modules/
if not you must install it
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so' - dlopen(/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so' - dlopen(/usr/local/Cellar/php54/5.4.30/lib/php/extensions/no-debug-non-zts-20100525/redis.so, 9): image not found in Unknown on line 0
I was getting this error/warning resolved it by uninstalling and installing redis
brew uninstall php54-redis
brew install php54-redis
I had the same warning when I wanted to install the symfony/security-bundle bundle in my Symfony 4 project:
composer require symfony/security-bundle
Here the warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: /usr/lib/php/modules/pdo_sqlite (/usr/lib/php/modules/pdo_sqlite: cannot open shared object file: No such file or directory), /usr/lib/php/modules/pdo_sqlite.so (/usr/lib/php/modules/pdo_sqlite.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
I checked my /etc/php/php.ini file and I uncommented the line extension=pdo_sqlite line. I had to install the package php-sqlite via my package manager because the file pdo_sqlite.so must be present in the /usr/lib/php/modules/ folder:
pacman -S php-sqlite
After, I typed again the composer command and the warning disappeared. I hope my answer can help you.