Error when installing Imagemagick with homebrew in OS X El Capitan - imagemagick

First of all I am completely new to homebrew.
I want to install imagemagick and did this:
brew install imagemagick
but get this error:
Error: An exception occured within a child process:
RuntimeError: /usr/local/opt/pkg-config not present or broken
Please reinstall pkg-config. Sorry :(
How can I fix this?

Related

Paperclip gem bug - Ruby on Rails

I tried building a simple recipe app, however I can't manage to fix one bug:
I tried installing ImageMagick 6.9.1-0 for Mac OS X 10.5 – 10.10.
However my mac uses OS X EL CAPITAN 10.11.1 and couldn't manage to get it working.
I also read that it's not safe to use it anymore.
What would you suggest? Are there any alternatives?
Use Homebrew to install ImageMagick.
First install Homebrew. Open up a terminal window and run:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then, ask it to install ImageMagic properly on your system:
brew install imagemagick
And you have a working copy of ImageMagic.

brew install gfortran Error: You must `brew link gmp' before gfortran can be installed

I tried installing gfortran using homebrew before I needed to install pythonbrew. I need pythonbrew to install and use the misopy package on my iMac. I keep getting this error when I want to install gfortran:
> brew install gfortran
Error: You must `brew link gmp' before gfortran can be installed
I tried reinstalling gmp using homebrew in mac and this did not help. Can someone help me in this regard?
Ok, I solved the problem. I did not completely remove the swig/gfortran/libpng files and their dependecies. If this information helps others installing pythonbrew and python 2.7 in mac.
I followed this guys instruction to start with in first place:
https://gist.github.com/audy/4012573
Do not mind his swearing I can understand where that comes from! :-)
KR

OSX Lion - cannot remove imagick

I am trying to remove imagick, it's installed via brew.
If I run brew remove imagick or brew uninstall imagick, I get
Error: No such keg: /usr/local/Cellar/imagick
How to fix it? Google didn't really help me.
Try to run
brew doctor
and follow the instructions. Hope that will fix it.

rmagick and OS X Lion

Just upgraded (i.e. not a new install) to Lion from Leopard and my previously well-working rmagick now doesn't work anymore and gives me this error:
Your Rack app raised an exception when Pow tried to run it.
LoadError: dlopen(/Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle, 9): Library not loaded:
/System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
Referenced from: /Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
Reason: image not found - /Users/rassom/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
~/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/RMagick2.bundle
~/.rvm/gems/ruby-1.8.7-p334/gems/rmagick-2.13.1/lib/rmagick.rb:11
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:68:in `require'
~/.rvm/gems/ruby-1.8.7-p334/gems/bundler-1.0.15/lib/bundler/runtime.rb:66:in `each'
Tried uninstalling rmagick and re-installing, but that didn't help.
Does anybody have a solution?
Thanks :-)
I had the same problem and resolved it by uninstalling ImageMagick, removing the rmagick gem and running bundle install again.
Make sure the rmagick gem is completely gone from your ~/.rvm/gems/ruby-1.8.7-p334/gems/ folder before re-installing and running bundle install and it should at least get you beyond that error.
I've found this: https://stackoverflow.com/questions/6674666/installing-imagemagick-leads-to-weird-error-involving-opencl
Copied /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib from 10.6 computer into the same folder on 10.7.
The file, i've uploaded here: http://www.workdreamer.com/uploads/libclparser.dylib
In my case, the error occurred after ImageMagick was upgraded via homebrew.
Unlike #Marcus' answer, I did not have to uninstall ImageMagick.
All it took was:
$ gem uninstall rmagick
$ bundle
Cheers
On Mac OSX Lion (10.7) with imagemagick installaed through homebrew this one fixed my problem:
First of all remove the broken rmagick from your rvm installation path: ~/.rvm/gems/ruby-1.9.3-p194/gems/
Afterwards reinstall imagemagick through brew and then run bundle again:
brew uninstall imagemagick
brew install imagemagick
bundle
Because I previously used 'bundle package' in my rails app, just uninstalling and reinstalling the gem didn't solve the problem, because a copy remained in vendor/. Removing the copy in vendor/ and running bundle install again fixed the problem.
Here is my full checklist to upgrade ruby environment to Mountain Lion: http://tektastic.kig.re/2012/07/getting-rmagic-and-friends-to-work-on.html
[ -- fixed June 19, 2007 ]

Can't install Ruby on OS X

I'm trying to follow the installation instructions for Ruby on Rails from Hivelogic.com. I've done this before on previous installs of OSX without trouble. I'm having trouble this time installing on Snow Leopard.
At the end of the "make" step installing Ruby, I get a number of errors related to readline. Not sure if this matters, but here they are:
readline.c: In function ‘username_completion_proc_call’:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
When I try to sudo make install, I get more errors. When I "which ruby", I get /usr/local/bin/ruby which is correct. But as soon as I try to use ruby, I get this message: "You need the Rosetta software to run ruby. The Rosetta installer is in Optional Installs on your Mac OS X installation disc." That's weird, but I installed Rosetta, and was able to proceed.
Except: I still have Ruby1.8.6 installed (not 1.8.7). "ruby -v" reports 1.8.6. 1.8.6 was the version that was migrated (I assume) from the Leopard install on this machine. In other words: where's my new Ruby? How do I get 1.8.7 (required by the current version of Rails) installed correctly?
I've always found macports the best way to install/manage my ruby versions. I have 1.8.6, 1.8.7 and 1.9.1 all installed using macports.
First, grab macports and install it.
Then, update (or create) your ~/.bashrc file to include the following line:
export PATH=/opt/local/bin:$PATH
This places all macports executables in front of you path, so you system will find them first.
Finally, install any of the versions of ruby you want:
sudo port install ruby186
sudo port install ruby
sudo port install ruby19
I also recommend installing rubygems from scratch after ruby is installed. Grab the latest rubygems release here and then run the following from inside the downloaded rubygems directory:
sudo ruby setup.rb
Hope this works out for you.
If you have snow leopard than 1.8.7 is pre-installed in /usr/bin
Another option is to use VirtualBox and install Ubuntu on VirtualBox. Ruby installation and usage is much smoother this way I have found, as I wasted a lot of time trying to get Ruby working properly on the Mac.

Resources