I am having Ubuntu 15.10 Desktop. I want to install libxml2. So any one tell me how i can install it. What i need to do to install libxml2 in my laptop. I am almost new to Linux, using it at least from 5-6 months.
3 Answers
There's a libxml2
package for that. You can install it with:
sudo apt-get install libxml2
If you want to compile software from source based on libxml2 you need the development files:
sudo apt-get install libxml2-dev

- 36,264
- 56
- 94
- 147
This tutorial will tell you exactly how to do it: https://geeksww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php
In summary, the steps are just the same as any other software installation:
Locate where you can get the latest version of the software. (From google, libxml2 webpage is here: http://www.xmlsoft.org/downloads.html. From there, you can find the ftp location where you can download the software. Notice the latest version available).
Download that latest version's .tar.gz file using wget, and extract it using tar command.
Compile and install the software by typing these terminal commands from within the extracted folder:
./configure make sudo make install
Update: Another way to do it, per the hint from David Foerster's answer, is to simply use apt-get to install the package for you rather than compiling and installing it yourself. The package you want here is probably either libxml2 or libxml2-dev. You can search for the package you want by typing
apt-cache search libxml2
Install the package using the typical apt-get method:
sudo apt-get install libxml2
or
sudo apt-get install libxml2-dev

- 127
- 2
- 9
-
1Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Kevin Bowen Oct 13 '16 at 23:49
-
Thanks for the suggestion, Kevin Bowen. I've edited my answer to include more details. Please don't delete my answer lol--I am honestly trying to help the OP here.. – Vicon Oct 14 '16 at 01:20
-
1Thanks for returning and improving your answer. It's appreciated. Welcome to AU! – Kevin Bowen Oct 14 '16 at 05:46
Find the name of the package you want to install with dpkg -l libxml\*
. On my system (YMMV) it shows 36 packages related to libxml
. sudo apt-get install
the packages you like.

- 36,399
sudo apt install libxml2-utils
because of this error:XMLLINT not set and xmllint not found in path; skipping xml preprocessing.
. Only mentioning in case it helps someone someday. – WinEunuuchs2Unix May 22 '18 at 02:53libxml++2.6-dev
is a different piece of software thanlibxml2-dev
although the former depends on the latter and will thus imply its installation. – David Foerster Sep 26 '19 at 11:40