Monday, October 26, 2009

MacPorts headaches... follow-up

Some of these issues apparently have to do with the order in which things are done and may also depend on the fact that some of these packages require native C-language extensions.

I wanted to work with nokogiri to do some XML parsing. Given my previous post, I figured I'd better install this using MacPorts, which I did:
     sudo port install nokogiri
That was pretty straight-forward and worked quickly. However, when I went to irb to check things out, I got the following message:

irb(main):001:0> require 'nokogiri'
HI.  You're using libxml2 version 2.6.16 which is over 4 years old and has
plenty of bugs.  We suggest that for maximum HTML/XML parsing pleasure, you
upgrade your version of libxml2 and re-install nokogiri.  If you like using
libxml2 version 2.6.16, but don't like this warning, please define the constant
So I quit irb and installed libxml2
     sudo port install libxml2
which also went just fine.  Unfortunately, nokogiri still gave me that long warning message.

What I had to do was re-install nokogiri so that it would recognize the new version of libxml2 (which was now in the /opt/local tree) and then everything worked fine.

Seems like I can get things to work now, but having to remember previous dependencies and re-install packages to pick up those new items isn't going to be fun.

No comments:

Post a Comment