# Problem Installing RMagick

**URL:** <https://www.ruby-forum.com/t/problem-installing-rmagick/196436>\
**Category:** Rails\
**Created:** [August 17, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436 "2007-08-17T15:31:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 17, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436/1 "2007-08-17T15:31:49Z")

</div>

Okay, so I am setting up a brand new Macbook and can’t seem to get  
RMagick or ImageMagick to install with Darwin Ports. Can anyone give  
me some insight as to why this may be failing? I get the same error  
when I do a “sudo port install imagemagick”.

Thanks!

sudo port install rb-rmagick  
Password:  
—\> Building XFree86 with target World  
Error: Target org.macports.build returned: shell command " cd “/opt/  
local/var/macports/build/  
\_opt\_local\_var\_macports\_sources\_rsync.macports.org\_release\_ports\_x11\_XFree86/  
work/xc” && make World " returned error 2  
Command output: dri\_driver.c:1108: error: ‘list’ undeclared (first use  
in this function)  
dri\_driver.c:1108: error: ‘mode’ undeclared (first use in this  
function)  
dri\_driver.c: At top level:  
dri\_driver.c:1112: error: parse error before ‘ctx’  
dri\_driver.c: In function ‘end\_list\_callback’:  
dri\_driver.c:1117: error: dereferencing pointer to incomplete type  
dri\_driver.c:1117: error: ‘ctx’ undeclared (first use in this  
function)  
dri\_driver.c: In function ‘unwrap\_context’:  
dri\_driver.c:1123: error: dereferencing pointer to incomplete type  
dri\_driver.c:1123: error: dereferencing pointer to incomplete type  
dri\_driver.c:1124: error: dereferencing pointer to incomplete type  
dri\_driver.c:1124: error: dereferencing pointer to incomplete type  
dri\_driver.c:1125: error: dereferencing pointer to incomplete type  
dri\_driver.c:1125: error: dereferencing pointer to incomplete type  
dri\_driver.c: In function ‘wrap\_context’:  
dri\_driver.c:1130: error: dereferencing pointer to incomplete type  
dri\_driver.c:1130: error: dereferencing pointer to incomplete type  
dri\_driver.c:1130: error: dereferencing pointer to incomplete type  
dri\_driver.c:1131: error: dereferencing pointer to incomplete type  
dri\_driver.c:1131: error: dereferencing pointer to incomplete type  
dri\_driver.c:1131: error: dereferencing pointer to incomplete type  
dri\_driver.c:1132: error: dereferencing pointer to incomplete type  
dri\_driver.c:1132: error: dereferencing pointer to incomplete type  
dri\_driver.c:1132: error: dereferencing pointer to incomplete type  
make[5]: \*\*\* [dri\_driver.o] Error 1  
make[4]: \*\*\* [all] Error 1  
make[3]: \*\*\* [all] Error 1  
make[2]: \*\*\* [all] Error 1  
make[1]: \*\*\* [World] Error 2  
make: \*\*\* [World] Error 2

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 17, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436/2 "2007-08-17T20:08:25Z")

</div>

You need to make sure you have MacPorts setup correctly and you have  
your paths right. Also for ImageMagick to work you MUST have X11  
installed! Follow the instructions on this page exactly for getting  
Mac Ports and X11 installed:  
[http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts](http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts)  
Then I would simply uninstall everything previously installed with  
MacPorts and start over once MacPorts is setup correctly.

Hope this helps,  
Wes

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 17, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436/3 "2007-08-17T20:32:27Z")

</div>

Thanks, I didn’t realize X11 is required? I could have sworn I was  
using  
RMagick without having X11 installed on my last Mac.

–Tom

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 17, 2007, 8:38pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/196436/4 "2007-08-17T20:38:28Z")

</div>

Last time I installed it I used this guide and things went fairly  
smoothly: [http://rmagick.rubyforge.org/install-osx.html](http://rmagick.rubyforge.org/install-osx.html)

-jc
