How to downgrade libxml 2.7.8 to 2.7.6 in Ubuntu

限于喜欢 提交于 2019-12-11 06:25:56

问题


One of my Rubygem (Nokogiri) was bult against libXML 2.7.6, but once i upgraded libXML to version 2.7.8, my programs are giving errors. To make my programs working i need to do a lot of modifications and i don't want to do them. Can i downgrade libXML to 2.7.6


回答1:


Did you try rebuilding Nokogiri to use the newer version of libxml?

gem uninstall nokogiri
gem install nokogiri

should do it. If you installed Nokogiri using sudo originally you'll need to use it with the commands above too.

Nokogiri has native code that gets compiled at installation, and that code would be unhappy if the libxml version changed. Uninstalling, then reinstalling should only take about 30 seconds, resulting in the native code being updated for the new library.




回答2:


What I usually do in this case is...

  1. Download the source for the version of the lib I want to use
  2. Use apt-get build-dep libxml to get the needed dependencies
  3. Configure the downloaded lib to use a prefix like /opt or $HOME
  4. Configure the app(s) that needs the "odd" version of the lib from source to use the downloaded version.
  5. Build & Install

In some cases it is also possible for two libs to live side-by-side and can be managed via the package manager but I have had really bad luck with this.




回答3:


Look at this: http://ubuntuforums.org/showthread.php?t=321156. It's a guide on downgrading packages.

Also, migrate to https://askubuntu.com/. They handle Ubuntu stuff.



来源:https://stackoverflow.com/questions/4363194/how-to-downgrade-libxml-2-7-8-to-2-7-6-in-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!