Brew doctor: dyld: Library not loaded & Error: No available formula for zlib - zlib

When I brew doctor I get the following errors:
dyld: Library not loaded: /usr/lib/libltdl.7.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Error: No available formula for zlib
The file libltdl.7.dylib is not in my /usr/lib directory, but there are several other .dylib files.
I'm running 10.8.1 with the latest version of Xcode (4.4.1) and its Command Line Tools installed.
Any idea how to solve these errors?

Try to re-install libtool by:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool
If that doesn't help, try removing libtool completely, and then retry the steps above:
brew uninstall libtool
If it still doesn't work after trying the steps above, check to see if you have the DYLD_FALLBACK_LIBRARY_PATH variable defined somewhere on the system (e.g. ~/.profile) and try unsetting it before trying the steps above again.
Other commands which could be useful for identifying the issue:
$ libtool --version
$ whereis libtool
$ set | grep DYLD_FALLBACK_LIBRARY_PATH
$ echo $DYLD_FALLBACK_LIBRARY_PATH

For me it works with:
sudo ln -s /usr/local/Cellar/libtool/2.4.2/lib/libltdl.7.dylib /usr/local/lib/libltdl.7.dylib

if you have an error about pcre like this :
dyld: Library not loaded: /usr/local/opt/pcre/lib/libpcre.1.dylib
Referenced from: /usr/local/Cellar/watchman/4.7.0/libexec/bin/watchman
Reason: image not found
Abort trap: 6
you need to link pcre.
brew link --overwrite pcre

Try:
brew tap homebrew/dupes
See: https://github.com/josegonzalez/homebrew-php/pull/219

None of them work I personally reinstalled Watchman like so:
brew uninstall watchman
brew reinstall watchman

The following worked for me:
brew uninstall --ignore-dependencies node
brew install node
Found the hint in this article: https://goulet.dev/posts/node-dyld-library-not-loaded-icu4c/

xcode-select --install
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install pcre
brew install libtool
that's it.

In my case I solve it with this link's file:
ln -s /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib /usr/local/opt/jpeg/lib/libjpeg.8.dyli

The response from kenorb is what worked for me + a little extra for safe measure:
brew update
freetype didn't have symlinks so:
brew link freetype
various other solutions I tried:
brew remove imagemagick
brew link jpeg libpng
brew install imagemagick
brew install libtiff
brew uninstall libtool
brew reinstall libtool --universal && brew unlink libtool && brew link libtool
There's a good chance that this wasn't all necessary if I had found
brew uninstall libtool
brew reinstall libtool --universal && brew unlink libtool && brew link libtool
first. But I thought I would post my full process in case anyone runs into issues

For me, I needed to fix XQuartz as brew doctor asked me too:
Warning: Your XQuartz (2.7.6) is outdated
Please install XQuartz 2.7.8:
https://xquartz.macosforge.org
It worked after that.

I experienced the same error in the process of installing AFNI. Installing PyQt, as suggested here, fixed the issue resulting from OSX 10.11 compatibility.
brew install pyqt

I had:
% neato
dyld: Library not loaded: /usr/lib/libltdl.7.dylib
Referenced from: /Users/me/Documents/dev/anaconda/bin/neato
Reason: image not found
zsh: abort neato
And the fix was
% echo $DYLD_FALLBACK_LIBRARY_PATH
/Users/me/anaconda/lib:/usr/lib
% export DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:/usr/local/lib
(and then add the export to a .bashrc or similar).

First :
brew uninstall libffi
Then :
brew install libffi

In my case I had
dyld: Library not loaded: /usr/local/opt/python/Frameworks/Python.framework/Versions/3.7/Python
Referenced from: /usr/local/Cellar/macvim/8.2-162/MacVim.app/Contents/MacOS/Vim
Reason: image not found
brew unlink python && brew link python and boom, fixed.

Related

Upgrading to Idris v 1.0 with Cabal?

Given:
$idris -v
0.99
I would like to upgrade to version 1. However, I blindly tried to upgrade by running cabal install idris to see this output:
$cabal install idris
Resolving dependencies...
All the requested packages are already installed:
idris-1.0
Use --reinstall if you want to reinstall anyway.
So, it appears that I've already installed idris version 1, but I'm not using it, per the idris -v output?
How can I use Idris v1 given my situation?
Depending on where .cabal dir is located...
add an Idris symlink to /usr/bin: a text file with the string /root/.cabal/bin/idris in it named idris. Specific path: /usr/bin/idris.
add a line to the end of your .bashrc file: export PATH="/root/.cabal/bin:$PATH"
My Linux distro is Ubuntu 16.04.2 LTS.

How to install cjson properly in Ubuntu 14.0LTS?

I am new in json and I don't know how to use but I found compare to XML json is better so, I am learning json in C programming in Ubuntu 14.0LTS.
I followed https://linuxprograms.wordpress.com/2010/05/20/install-json-c-in-linux/.
In this link, I installed libjson0 with the help of first command but when I installed libjson – debug symbols package with the help of second command which is mentioned in link then showing "E: Unable to locate package libjson0-dbg".
Also I gone through https://github.com/json-c/json-c. After cloning moved to json-c directory, in json-c directory I did sh autogen.sh then showing "autogen.sh: 2: autogen.sh: autoreconf: not found".
Why autoreconf is not works ? When I installed CppUTest and other stuffs then it works.
I also install build-essential which found in google for above problems but it can't works for me.
How can I installed cjson in a proper manner and how to use with the C-programms.
Try below commands:
$ sudo apt-get install libjson-glib-1.0-0 libjson-glib-1.0-0-dev
If you want to debug your programs and see the various steps of serializing/deserializing you can also install the libjson-glib – debug symbols package
$ sudo apt-get install libjson-glib-1.0-0-dbg
For documentation related to json-glib, you must install the following package
$ sudo apt-get install libjson-glib-1.0-0-doc
This documentation will then be available in file:///usr/share/gtk-doc/html/json-glib/index.html
Maybe your problem is related with the path.
The library is installed correctlly but you have tot tell the system where. Here a post on how to do it in Ubuntu How to set the environmental variable LD_LIBRARY_PATH in linux

how to install xlibs-dev on Ubuntu 10.04 (lucid)?

I'm trying to install V4L2 on Ubuntu 10.04 (lucid) that require the xlibs-devinstalled. I tried: sudo apt-get install xlibs-dev but it returns:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package xlibs-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package xlibs-dev has no installation candidate
then I tried:
First attempt: attemp:sudo apt-get install xorg-dev;
Second attemp: sudo apt-get update and sudo apt-get upgrade;
All failed. same install xorg-dev,updated and upgraded my packages, can't to install the xlibs-dev library. how to fix this? thanks in advance.
The command
apt-cache search xlib dev
suggest you to
aptitude install libx11-dev
And your distribution might have V4L2. Consider installing the v4l2ucp package...
PS. There is no s letter in xlib because it is one library, not several!

opencv install folder on ubuntu

I installed opencv2.3 on ubuntu by first adding the ppa and the doing apt-get install
$ sudo add-apt-repository ppa:gijzelaar/cuda
$ sudo add-apt-repository ppa:gijzelaar/opencv2.3
$ sudo apt-get update
$ sudo apt-get install libopencv-dev
I am developing on Eclipse and my programs work. I have this one problem though, while following an ebook. I cannot find the /opencv/samples folder in my system. I did a unix directory search to no avail.
Also, in Synaptic Package Manager I find that the opencv packages are not marked green, ie they're not installed. However I have written and executed opencv codes on my machine.
What is the reason for this?
It seems you have installed binary OpenCV package while the samples are (most likely) included only to source package.

Am I supposed to do a brew ln after every brew install? (Mac OS Package Manager homebrew)

I'm not sure I'm using the Mac OS brew package manager properly. Packages don't end up in /usr/local unless I follow a
brew install foo
with a
brew ln foo
What makes me suspicious is nearly every quickstart tutorial I see on using brew doesn't indicate that the ln step is required.
Am I missing something?
It's especially annoying when I install something like ffmpeg, that installs a lot of prerequisites. I find myself having to read the log, finding what it installed and manually doing a
brew ln yasm
brew ln videolan
brew ln faac
etc, for each prerequisite installed. I can't believe it's supposed to work this way. What am I doing wrong.
You shouldn't have to; brew ln should be performed automatically after a package is installed.
only if you do a manual compile/install, change formula, non-default location

Resources