Created
November 8, 2011 23:26
-
-
Save devpuppy/1349681 to your computer and use it in GitHub Desktop.
How to fix: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8
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
FIXME: | |
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8 | |
or | |
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found | |
gem uninstall nokogiri libxml-ruby | |
brew update | |
brew uninstall libxml2 | |
brew install libxml2 --with-xml2-config | |
brew link libxml2 | |
brew install libxslt | |
brew unlink libxslt | |
gem install nokogiri -v 1.4.4 -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 | |
sources: | |
https://gist.github.com/746966 | |
https://gist.github.com/1226596 |
@talansu I think you may be correct. Following the instructions for the first time, when running #15 as is I got:
Unlinking /usr/local/Cellar/libxslt/1.1.26... 0 links removed
This tells us that it's a keg-only formula, so it doesn't automatically create the symlink for us.
Running the command as brew link libxslt
, I got:
Linking /usr/local/Cellar/libxslt/1.1.26... 22 symlinks created
Started getting a similar error, but now about version 2.8.0:
WARNING: Nokogiri was built against LibXML version 2.7.8, but has dynamically loaded 2.8.0
Fixed with:
$ gem uninstall nokogiri
$ gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
brew install libiconv
gives an error, missing package.
It works without iconv however:
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.9.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.9.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.28
Thanks for this gist; here's what I did to use bundler, mixing this gist and my previous attempt:
bundle config build.nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local
This solution worked for me (on May 24, 2013):
https://coderwall.com/p/o5ewia
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#15 should be
brew link libxslt
?