Last active
August 29, 2015 14:05
-
-
Save Jasonbit/73f9b82d8e129b94146f to your computer and use it in GitHub Desktop.
Yosemite freetype and ImageMagick error fixer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There's bummer errors on installing ImageMagick on Yosemite (as I write this, I'm on DP5). Here's the errors and fixes at the terminal. | |
Homer: jason$ brew reinstall --debug freetype | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/freetype.rb | |
==> Reinstalling freetype | |
/usr/local/Library/brew.rb (Formulary::StandardLoader): loading /usr/local/Library/Formula/libpng.rb | |
Warning: freetype-2.5.3_1 already installed | |
Homer: jason$ ln -s /usr/local/Cellar/freetype/2.5.2 /usr/local/Cellar/freetype/2.5.3_1 | |
Homer: jason$ brew install ImageMagick | |
Error: You must `brew link freetype' before imagemagick can be installed | |
Homer: jason$ brew link freetype | |
Linking /usr/local/Cellar/freetype/2.5.3_1... Error: No such file or directory - /usr/local/Cellar/freetype/2.5.2/include/freetype2 | |
Ok, let's fix the symlink manually. | |
Mira-3:rails jason$ ln -s /usr/local/Cellar/freetype/2.5.3_1 /usr/local/Cellar/freetype/2.5.2 | |
Check our work. | |
Homer: jason$ ls -la /usr/local/Cellar/freetype | |
total 8 | |
drwxr-xr-x 4 jason admin 136 Aug 14 15:17 . | |
drwxr-xr-x 18 jason admin 612 Aug 14 15:10 .. | |
lrwxr-xr-x 1 jason admin 34 Aug 14 15:17 2.5.2 -> /usr/local/Cellar/freetype/2.5.3_1 | |
drwxr-xr-x 10 jason admin 340 Aug 14 15:16 2.5.3_1 | |
Looks good, now let's continue on with ImageMagick. | |
Homer: jason$ brew install ImageMagick | |
==> Downloading https://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.8.9-5.tar.xz | |
######################################################################## 100.0% | |
==> ./configure --disable-osx-universal-binary --prefix=/usr/local/Cellar/imagemagick/6.8.9-5 --enable-shared --disable-static --without-pango --with-modules --disable-openmp --without-gslib --without | |
==> make install | |
Error: An unexpected error occurred during the `brew link` step | |
The formula built, but is not symlinked into /usr/local | |
No such file or directory - /usr/local/Cellar/imagemagick/6.8.0-10/lib/ImageMagick | |
Error: No such file or directory - /usr/local/Cellar/imagemagick/6.8.0-10/lib/ImageMagick | |
Ok, let's see if we can patch this one up. | |
Home: jason$ ls -la /usr/local/Cellar/imagemagick | |
total 0 | |
drwxr-xr-x 3 jason admin 102 Aug 14 15:18 . | |
drwxr-xr-x 19 jason admin 646 Aug 14 15:18 .. | |
drwxr-xr-x 14 jason admin 476 Aug 14 15:19 6.8.9-5 | |
Homer: jason$ ln -s /usr/local/Cellar/imagemagick/6.8.9-5 /usr/local/Cellar/imagemagick/6.8.0-10 | |
Now, we have to add all the binaries. To do this, we need to go to the usr bin dir and symlink all the image magick binaries. | |
Homer: jason$ cd /usr/local/bin | |
Homer: jason$ ln -s /usr/local/Cellar/imagemagick/6.8.9-5/bin/* -t . | |
Homer: jason$ convert --help | |
Version: ImageMagick 6.8.9-5 Q16 x86_64 2014-08-14 http://www.imagemagick.org | |
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC | |
Features: DPC Modules | |
Delegates: bzlib freetype jng jpeg ltdl lzma png xml zlib | |
Usage: convert [options ...] file [ [options ...] file ...] [options ...] file | |
(etc, etc). Now we'll see if it works for Rails. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, I installed Yosemite and reviewing a project in php, I have an error: FreeType with GD or ImageMagick PHP extensions are required.
I performed the steps you described to solve it, but still shows me that error. You know why?
Thank you.