Lion (10.7) Not supporting Convert(1). Dylib error - macos

When trying to use convert(1), I get the following error:
dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /usr/local/bin/convert
Reason: image not found
Trace/BPT trap: 5
Any idea how I could fix it ?

I was getting this error as well–with a homebrew install of ImageMagick. Along the same lines as Pascal, I fixed it with
Install XCode 4.1 (from the App Store)
In Xcode, go to Xcode > Preferences... > Downloads tab > click Install next to Command Line Tools
Uninstall ImageMagick with brew uninstall imagemagick
Update homebrew with brew update
Install latest homebrew with brew install imagemagick
Run brew doctor and delete any of the *.la and *.a files listed if step 4 fails on make install

I got the same error and what solved the problem for me was:
Install the latest XCode version from the Mac Appstore
Install ImageMagick using Macports (sudo port install imagemagick)
Both steps took a while, but in the end ImageMagick worked fine again.

I installed xcode but had some issue with macports. Bummer!
I copied the libclparser.dylib file over from an old backup of 10.6, changed the permissions to match the other files in that folder and it worked!
Also see here:
https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl
Edit:
I found this, which may be useful: http://cactuslab.com/imagemagick/
Also, the file is here: http://www.workdreamer.com/uploads/libclparser.dylib

Reinstalling it even with brew instead of macports didn't work for me. Copying it did.

Try the following command:
brew doctor
to diagnose the common problems.
One of it could be removing DYLD_FALLBACK_LIBRARY_PATH variable from your ~/.profile
Or you have to re-install libtool by:
brew reinstall libtool --universal && brew unlink libtool && brew link libtool

Related

why can't I install watchman using brew command?

I'm trying to run a react native app and I've been told I need to download "watchman".
When I tried to run the command brew install watchman it gave this error:
Error: The following formula cannot be installed from bottle and must be
built from source.
python#3.9
Install the Command Line Tools for Xcode 11.3.1 from:
https://developer.apple.com/download/more/
Do I need to install Xcode or I'm just missing something? Is there any easier way to install watchman?
Thank you in advance.
If you don't mind, you can try installing directly from Facebook's Homebrew Tap:
brew tap facebook/fb
brew update
brew install facebook/fb/watchman

pdf2swf not installed through Homebrew – but the rest of swftools are

Environment OSX 10.9.5
I am trying to install swftools so that I can use pdf2swf. I am installing through HomeBrew. I've seen various notes about pdf2swf failing to install if its dependencies have not been previously installed. So using the command at the link I use:
$ brew install freetype libjpeg giflib swftools
And it completes without error – except pdf2swf is not installed. When I look in usr/local/bin, I see the other swftools are installed successfully.
Does anyone know what might be wrong?
Update: For completeness if anyone comes across this question looking to use pdf2swf in an AIR desktop app: you can't. Apparently pdf2swf compiles the swf with certain "AllowDomain" security settings and there is no option to not do that. Short of editing the source code and compiling pdf2swf oneself, it seems a deadend.
If you look at the brew formula: brew edit swftools, PDF support comes via xpdf and this is not included by default as XQuartz needs to be installed:
brew instal swftools --with-xpdf
swftools: XQuartz is required to install this formula.
You can install with Homebrew Cask:
brew install Caskroom/cask/xquartz
You can download from:
https://xquartz.macosforge.org
Error: An unsatisfied requirement failed this build.
So:
Install XQuartz
brew install swftools --with-xpdf

Can't install imagemagick with brew on Mac OS X mavericks

I am using Homebrew v0.9.5 on my Mac OS X version 10.9.4
When I run the command: `brew install imagemagick, this error occurred.
$ brew install imagemagick
==> Installing dependencies for imagemagick: libpng, freetype
==> Installing imagemagick dependency: libpng
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/machomebrew/Bottles/libpng-1.6.12.mavericks.bottle.tar.gz
Warning: Bottle installation failed: building from source.
==> Downloading https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
curl: (7) Failed connect to downloads.sf.net:443; Operation timed out
Error: Failed to download resource "libpng"
Download failed: https://downloads.sf.net/project/libpng/libpng16/1.6.12/libpng-1.6.12.tar.gz
I have added --disable-openmp option, it also doesn't go well.
$ brew install imagemagick --disable-openmp
brew doctor command result has no problem.
$ brew doctor
Your system is ready to brew.
Have you tried a
$ brew update
$ brew install imagemagick --disable-openmp --build-from-source
Apparently that seemed to fix it for me on Mac OS 10.8 (Mountain Lion). Previously I checked out the latest imagemagick brew recipe with "brew versions imagemagick" and "git checkout e68e443", see here and here
I'm not certain whether the source of my problem was the same as the OP's, however (though this has an accepted answer already) I'll post this in case this solution works for others.
Using brew install imagemagick, I would encounter the following error:
curl: (52) Empty reply from server Error: Failed to download resource
"libpng" Download failed:
https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz
Which is similar, if less specific than the OP's message.
As it turned out, I already had a previous version of libpng installed (version 1.5.7). I then ran:
brew upgrade libpng
Followed by another brew install libpng, and this time it succeeded, as it now had the correct version needed.
This problem also occurs because https://downloads.sf.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz has a badly configured SSL certificate. Open the link in your browser and see if your browser complains.
If that's the case, you can manually download the file to /Library/Caches/Homebrew and run again.
Source: https://github.com/Homebrew/homebrew/issues/36703
For me it was upgrading to El Capitan. I found the simplest solution was to force remove homebrew:
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
then to re-install it:
sudo /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
then install imageMajick:
brew install ImageMagick
Depending on your setup you may not want to sudo. For me, its fine. Enjoy a snack while you manipulate images.
In my case the url was simply not correct, with which homebrew wanted to download the required file. I looked it up here http://sourceforge.net/projects/libpng/files/libpng16/older-releases/1.6.16/ by myself and copied it to /Library/Caches/Homebrew like #Dan suggested.
I then run brew install libpng again and it worked.
Follow this:
brew install imagemagick#6
Add below lines in to ~/.bash_profile file
export LDFLAGS="-L/usr/local/opt/imagemagick#6/lib" export
CPPFLAGS="-I/usr/local/opt/imagemagick#6/include" export
PKG_CONFIG_PATH="/usr/local/opt/imagemagick#6/lib/pkgconfig"
Install Rmagick
source ~/.bash_profile
gem install rmagick
If you are an Anaconda/Miniconda user on Mac OSX or Linux, you can install packages like imagemagick using conda.
conda install -c conda-forge imagemagick
https://anaconda.org/conda-forge/imagemagick

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