Library not loaded error after brew install php56 - macos

I'm upgrading from php5.5 to php5.6 on OSX Mavericks using homebrew. I run
brew install php56
Everything runs and completes fine but when I run php -v the following error comes up
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
How do I fix this?

Try this
brew uninstall --ignore-dependencies node icu4c
brew install node

For me simply upgrading php helped.
brew upgrade php
The corresponding file dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.<version>.dylib did not exist but a more recent one. So my php version was a bit behind compared to other dependents which probably upgraded icu4c when upgrading them. (Either node or postgresql?)

In my case, it was a symlink issue with the previous installation. Everything was fine after running
brew link --overwrite php56
P.S. Before running with --overwrite, try without. If you get the error below like I did, then go ahead.
Linking /usr/local/Cellar/php56/5.6.3...
Error: Could not symlink bin/pear
Target /usr/local/bin/pear
is a symlink belonging to php55. You can unlink it:
brew unlink php55
To force the link and overwrite all conflicting files:
brew link --overwrite php56
To list all files that would be deleted:
brew link --overwrite --dry-run php56

previous solution was not working:
$ php -i
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.55.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Trace/BPT trap: 5
solved with:
$ brew update && brew upgrade icu4c
see https://github.com/Homebrew/homebrew-php/issues/1701

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.53.dylib
It sounds like an issue with icu4c. So try:
brew uninstall icu4c && brew install icu4c
brew unlink icu4c && brew link icu4c --force
In case of further issues, investigate them by brew doctor.

For this to be fixed for me (Mavericks 10.9.5) necessitated the entire routine described in this GitHub issue, namely:
brew uninstall --force php56
brew update
brew tap --repair
find $(brew --cache) -mindepth 1 -print -delete
brew install -v php56
(and in my case I needed brew install php56-mcrypt as well, as that was missing.)
I'd had PHP 5.4 and 5.6 installed before, with 5.4 being the active ("linked") one – I wanted to switch. I'd installed the php-switcher package, which is a very neat way of letting you do this, but it wasn't working prior to the above procedure.

brew uninstall --ignore-dependencies node icu4c
brew install node
worked for me.

Related

dyld: Library not loaded: /usr/local/opt/isl/lib/libisl.21.dylib

I'm trying to get set-up with QMK to write my own key maps for a Rama M6-c.
When running make wilba_tech/rama_works_m6_b:default, which is also used for the Rama M6-c, I keep receiving the following message:
dyld: Library not loaded: /usr/local/opt/isl/lib/libisl.21.dylib
within my terminal.
The error message is
internal compiler error: Abort trap: 6 signal terminated program cc1.
I've tried the suggested commands mentioned on QMK's website to no success.
I've also tried upgrading homebrew, uninstalling homebrew, re-installing homebrew, fixing any warnings from homebrew's doctor command, re-running util/qmk_install.sh, upgrading node, and switching node versions.
Has anyone else experienced this issue recently or have any suggestions/fixes?
OS: macOS Catalina
node: 12.14.0 (default set through NVM)
device: Rama M6-c
Try updating the reference to isl :
install_name_tool -change '/usr/local/opt/isl/lib/libisl.21.dylib' /usr/local/opt/isl/lib/libisl.dylib /usr/local/Cellar/avr-gcc#8/8.3.0/libexec/gcc/avr/8.3.0/cc1
This very issue is described in the FAQ:
https://docs.qmk.fm/#/faq_build?id=avr-gcc-internal-compiler-error-abort-trap-6-program-cc1-on-macos
This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
The solution is to remove and reinstall all affected modules.
brew rm avr-gcc
brew rm avr-gcc#8
brew rm dfu-programmer
brew rm dfu-util
brew rm gcc-arm-none-eabi
brew rm arm-gcc-bin#8
brew rm avrdude
brew install avr-gcc#8
brew install dfu-programmer
brew install dfu-util
brew install arm-gcc-bin#8
brew install avrdude
brew link --force avr-gcc#8
brew link --force arm-gcc-bin#8
And after that, run this command to force use v8:
brew link --overwrite avr-gcc#8 --force
It will fix your problem. At least it did for me.
This happened for me on a Mac while running the musl.cc cross compilers. I solved it via
brew install isl
Since I can't comment yet ...
You want this specifically:
install_name_tool -change '/usr/local/opt/isl/lib/libisl.21.dylib' /usr/local/opt/isl/lib/libisl.dylib /usr/local/Cellar/avr-gcc#8/8.3.0/libexec/gcc/avr/8.3.0/cc1
install_name_tool -change '/usr/local/opt/isl/lib/libisl.21.dylib' /usr/local/opt/isl/lib/libisl.dylib /usr/local/Cellar/avr-gcc#8/8.3.0/libexec/gcc/avr/8.3.0/lto1
So that both compiling and LTO work (if you use it).

Can't install php7 or php 7.1 with homebrew

I was following a couple links that had this same sequence, namely this example. I was unable to get it done successfully. Here is the output from terminal
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/dupes
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/versions
MacBook-Pro-4:/ SHennessy$ brew tap homebrew/homebrew-php
MacBook-Pro-4:/ SHennessy$ brew unlink php56
Error: No such keg: /usr/local/Cellar/php56
MacBook-Pro-4:/ SHennessy$ brew install php70
==> Installing php70 from homebrew/php
Error: You must `brew link libpng` before homebrew/php/php70 can be installed
MacBook-Pro-4:/ SHennessy$ brew link php70
Error: No such keg: /usr/local/Cellar/php70
MacBook-Pro-4:/ SHennessy$
If anybody has any ideas that would be awesome, thanks in advance.
I had more or less the same issue when installing php71.
To resolve it, I had to delete /usr/local/Cellar/php71 using sudo rmdir -rf /usr/local/opt/php71 and then :
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php71
Hope it helps.
Everything is now outdated
All was migrated to homebrew/homebrew-core
For MacOS Monterey I faced a similar issue /usr/local/Cellar/php while switching between different php versions
Following steps help me to fix my issue
Step 1
After installing php first link that particular version
brew link php#7.3 //Whatever you installed
Step 2
Switching to another php version use the following commands
brew unlink php#7.3 //Whatever is your current active version
brew link --overwrite --force php#7.4 //Whatever your desired version
Or you can use single command
brew unlink php#7.3 && brew link --overwrite --force php#7.4
For php 5.6 & php 7.0
As of now the tap is empty and all of its formulae are migrated to homebrew/core
so i untapped & cleaned
brew untap homebrew/dupes
brew cleanup
And tapped this repo for older php versions
brew tap exolnet/homebrew-deprecated
And resinstalled php versions
brew reinstall php#7.1
brew reinstall php#5.6
For MacOS Catalina you need to do this fallowing commands.
brew tap exolnet/homebrew-deprecated
brew install php#7.1 (or other versions which lower then 7.1)
You can read more about this, just visit here https://getgrav.org/blog/macos-catalina-apache-multiple-php-versions.
Hope my answer will help you.
For macOS Venture I had multiple PHP folders under '/usr/local/opt/' so I erased the old versions and then I installed the latest.
Steps I took:
which php
cd /usr/local/opt/
rm -r php#7.0
rm -r php#7.4
rm -r php#8.0
Restart machine and then a php -v

uWSGI can not load libssl.1.0.0.dylib

When I call uwsgi, it always shows the following:
dyld: Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/xingshi/anaconda/bin/uwsgi
Reason: image not found
Trace/BPT trap: 5
Here is all the libssl.1.0.0.dylib on my Mac:
$ locate libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/lib/libssl.1.0.0.dylib
/Library/PostgreSQL/9.2/pgAdmin3.app/Contents/Frameworks/libssl.1.0.0.dylib
/Users/xingshi/anaconda/lib/libssl.1.0.0.dylib
/Users/xingshi/anaconda/pkgs/openssl-1.0.1c-0/lib/libssl.1.0.0.dylib
/opt/local/lib/libssl.1.0.0.dylib
And my uwsgi is in anaconda
$which uwsgi
/Users/xingshi/anaconda/bin/uwsgi
Any ideas ?
MacPorts usually install softwares into /opt/local/, but brew will install softwares into /usr/local/. It seems that my uwsgi is looking for the libssl.1.0.0.dylib in /usr/local/lib, so I use brew to install openssl and relink it:
brew install --upgrade openssl
brew unlink openssl && brew link openssl --force
I performed this:
I have been having this error for a long time and performing
brew uninstall openssl
brew install openssl
did not work for me even including "--force"
However, I found this link to this blog and it did work for me.
http://mithun.co/hacks/library-not-loaded-libcrypto-1-0-0-dylib-issue-in-mac/
Step 1: Install openssl using brew
brew install openssl
Step 2: Copy copy libssl.1.0.0.dylib and
libcrypto.1.0.0.dylib
cd /usr/local/Cellar/openssl/1.0.1f/lib
sudo cp libssl.1.0.0.dylib libcrypto.1.0.0.dylib /usr/lib/
Note the bold folder name. There will be change in that depending on
your openssl version
Step 3: Remove the existing links
sudo rm libssl.dylib libcrypto.dylib
sudo ln -s libssl.1.0.0.dylib libssl.dylib
sudo ln -s libcrypto.1.0.0.dylib libcrypto.dylib
I hope this helps!
my error specifically for Mac OSx, was..
user-MacBook-Pro:src user$ uwsgi --enable-threads --ini deploy.ini
dyld: Library not loaded: /opt/local/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/uwsgi
Reason: image not found
Abort trap: 6
user-MacBook-Pro:src user$
this suddenly started happening, either after upgrading Mac OSx to v10.14.6 or after an extensive installation process playing around with aircrack-ng (i'm not sure which)
but, the following fixed my issue... (help from https://stackoverflow.com/a/59055043/2298002)
$ brew update
$ brew upgrade
$ brew install openssl # yielded 'already installed'
$ brew reinstall uwsgi # yielded 'could not symlink' error
$ brew link --overwrite uwsgi
NOTE: uwsgi now works fine, but i still cannot run $ man uwsgi, yields...
user-MacBook-Pro:src user$ man uwsgi
No manual entry for uwsgi
user-MacBook-Pro:src user$
... anyone have any incites to this?

SVN 1.8.4 libserf-1.1.3.0.dylib

After I updated SVN version on my mac using homebrew I'm getting following error:
dyld: Library not loaded: /usr/local/lib/libserf-1.1.3.0.dylib
Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/svn
Reason: image not found
Trace/BPT trap: 5
I have no idea what libserf-1.1.3.0.dylib is and where it should be!
Any thought?
[UPDATE 01]
I tried installing serf using following:
brew install serf
and got the following error:
Error: No available formula for serf
also I checked svn dependncies on homebrew by doing brew deps svn there is no serf:
autoconf
automake
libtool
pkg-config
scons
sqlite
Got it working.
If you want the latest svn uninstall and then build from source
brew remove svn
brew install --build-from-source svn
If you want an older version (I needed 1.6.17) then follow the direction here, but replace the line that says brew install with the install command from above (don't forget to remove svn first though)
If anyone has httpd installed with brew these commands worked for me:
brew unlink httpd
brew install svn
brew link httpd
Hope this helps!

ImageMagick and OS X Lion trouble

[edit] I was troubleshooting problems with my development environment when I noticed one of my problems was the dependency on ImageMagick, since it's a vital part of my app.
After upgrading to OS X Lion (10.7) i no longer had ImageMagick available, i then tried installing again using MacPorts without success, i then installed from source, and the install wasn't very successfully i had convert and identify but it output error messages that i unfortunately dont have anymore, i by some strange reason decided to remove all of my MacPort libraries and started using Homebrew, i tried installing ImageMagick, it installs OK but when i try to use it throws this error
dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib
Referenced from: /usr/local/bin/convert
Reason: Incompatible library version: convert requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0
Trace/BPT trap: 5
I read online but i have no clue on whats going on here, i found that libltdl is called libtool, and that i obviously need to upgrade it to a newer version, but i havent found any indication of how or where to find the source, or if this should be already be handled by homebrew and why it hasn't.
I tried installing ImageMagick again from source using this installer script https://github.com/masterkain/ImageMagick-sl but when i try to use convert it throws a similar error.
$ convert gnome.jpg -resize 50% gnome_.jpg
dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib
Referenced from: /usr/local/bin/convert
Reason: Incompatible library version: convert requires version 11.0.0 or later, but libltdl.7.dylib provides version 10.0.0
Trace/BPT trap: 5
$ which convert
/usr/local/bin/convert
What can i do to solve my problem?
On 10.8 I solved this issue with:
brew install libtool --universal
brew link libtool
If you don't know what brew is, visit https://github.com/mxcl/homebrew and its wiki.
brew uninstall imagemagick
brew install imagemagick --build-from-source
worked for me
I too use homebrew for installing packages but imagemagick stopped working after upgrading OSX 10.8 to 10.9 (Mavericks). I had to do the following steps:
brew uninstall imagemagick
brew uninstall libtool
brew install libtool --universal
brew install imagemagick --build-from-source
Why the --build-from-source? Well for me running brew install imagemagick on its own to install the pre-built binary wasn't sufficient; it fixed the original 'dyln' error but was replaced with:
unable to load module `/usr/local/Cellar/imagemagick/6.8.7-7/lib/ImageMagick//modules-Q16/coders/png.la': file not found # error/module.c/OpenModule/1277
I also upgraded to Lion and lost ImageMagick, although i'm getting different errors.
i found a Lion distribution on imagemagick.org. not a big fan of the DYLD_LIBRARY_PATH environment variable but it works.
ok scratch that. i just downloaded the ImageMagick source and re-compiled:
cd /tmp
curl -OL ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzf ImageMagick.tar.gz
cd ImageMagick-6.7.2-7/
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-gs-font-dir=/usr/local/share/ghostscript/fonts
make
sudo make install
On Mountain Lion OSX,
Even with the updated brew for imagemagick(which includes libtool), this error seemed to happen to me.
so i fixed it using the following commands
brew uninstall libtool
brew install libtool --universal
brew link libtool --force
For others looking and still having trouble, I used this:
https://github.com/maddox/magick-installer
On 10.8, with brew, I solved this issue with:
brew install graphicsmagick
For the googlers: If you happened to have it installed with brew beforehand, you'll need to reinstall by running brew uninstall graphicsmagick before installing again. Easy.
This helped me after restoring OS X 10.9.3 from time machine.
brew uninstall imagemagick
brew uninstall libtool
brew install libtool --universal
brew unlink libtool && brew link libtool
brew install imagemagick
brew install Homebrew/python/pillow
brew link --overwrite pillow
The same problem might occur with OSX Mountain Lion (preview 4). I had to configure some parts separately because there are some library incompatibilities:
dyld: Library not loaded: /usr/local/lib/libjpeg.8.dylib
Referenced from: /usr/local/bin/convert
Reason: Incompatible library version: convert requires version 13.0.0 or later, but libjpeg.8.dylib provides version 9.0.0
I had to add --with-fontconfig=no, --with-lzma=no and use /opt/local/share/... instead of /usr/local/share/... for the ghostscript fonts:
cd /tmp
curl -OL ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
tar -xzf ImageMagick.tar.gz
cd ImageMagick-6.7.8-0/
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp --with-fontconfig=no --with-gs-font-dir=/opt/local/share/ghostscript/fonts --with-lzma=no
make
sudo make install
I could fix the ImageMagick problem by installing corresponding package from cactuslab site.
Then by setting the PATH variables in terminal:
export MAGICK_HOME="/usr/local/ImageMagick/"
export PATH="$MAGICK_HOME/bin:$PATH"
export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib/"
If you're using Homebrew, try the following command:
brew doctor
to diagnose the common problems.
One of it could be to remove DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile if you have it.
Or you have to re-install libtool by:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool
I tried most of the solutions above and they didn't work. Here's how I fixed my problem:
brew install imagemagick;
brew install freetype;
cd /usr/X11/lib/;
sudo mv libfreetype.6.dylib libfreetype.6.dylib.orig;
sudo ln -s /usr/local/opt/freetype/lib/libfreetype.6.dylib libfreetype.6.dylib
Tested on OS X 10.7.2
For 10.7.8 and up, you have to install the php version and not the pecl version. Depending on your version of php you've install with Macports you can either do:
sudo port install php-imagick
sudo port install php5-imagick
sudo port install php53-imagick
sudo port install php54-imagick
Remember only to do the one of your current version of php.

Resources