No package ‘libxml-2.0’ found
For Ubuntu the following helped me: apt-get install libxml2-dev
For Ubuntu the following helped me: apt-get install libxml2-dev
You typically need to use glibtool and glibtoolize, since libtool already exists on OS X as a binary tool for creating Mach-O dynamic libraries. So, that’s how MacPorts installs it, using a program name transform, though the port itself is still named ‘libtool’. Some autogen.sh scripts (or their equivalent) will honor the LIBTOOL / LIBTOOLIZE … Read more
Include the following in your header search path and you should be immune to any weirdness Apple does with their Xcode updates: $(SDKROOT)/usr/include/libxml2
Use options first to check: brew options libxml2 If this dose not satisfy you, edit the rb file directly, and do whatever you want to: brew edit libxml2
Use libxml_use_internal_errors() to suppress all XML errors, and libxml_get_errors() to iterate over them afterwards. Simple XML loading string libxml_use_internal_errors(true); $doc = simplexml_load_string($xmlstr); $xml = explode(“\n”, $xmlstr); if (!$doc) { $errors = libxml_get_errors(); foreach ($errors as $error) { echo display_xml_error($error, $xml); } libxml_clear_errors(); }
If you installed Nokogiri with gem install nokogiri, you can resolve this warning by running gem pristine nokogiri to recompile the gem’s C extension. If you installed Nokogiri with bundle install, you can resolve this warning by running bundle exec gem pristine nokogiri to recompile the C extension of the gem wherever Bundler installed it.
I had the same issue. Unfortunately the “Installing Nokogiri” doesn’t cover Iconv issues. Here’s how I resolved the issue. First install homebrew, it’ll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so: brew update Note: In OSX 10.9+ you may need to install … Read more
Follow the directions here, under “Setting up your project file.” Setting up your project file You need to add libxml2.dylib to your project (don’t put it in the Frameworks section). On the Mac, you’ll find it at /usr/lib/libxml2.dylib and for the iPhone, you’ll want the /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/usr/lib/libxml2.dylib version. Since libxml2 is a .dylib (not a nice … Read more
You can also install Nokogiri on Mac OS X 10.9 Mavericks with full XCode Install using: gem install nokogiri — –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 Update For those using Yosemite the following command will work: gem install nokogiri — –with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/libxml2 –use-system-libraries or, it might actually be in your MacOSX10.11.sdk folder (mine was as of 18-Sep-2015) anyways, so even if … Read more
Since you’re on Ubuntu, don’t bother with those source packages. Just install those development packages using apt-get. apt-get install libxml2-dev libxslt1-dev python-dev If you’re happy with a possibly older version of lxml altogether though, you could try apt-get install python-lxml and be done with it. 🙂