问题
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...
- Download the source for the version of the lib I want to use
- Use
apt-get build-dep libxml
to get the needed dependencies - Configure the downloaded lib to use a prefix like /opt or $HOME
- Configure the app(s) that needs the "odd" version of the lib from source to use the downloaded version.
- 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