ubuntu安装libxml2
1、下载libxml2
地址http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html
这里选择的是libxml2-2.9.0.tar.gz
2、解压
tar zxvf libxml2-2.8.0.tar.gz
3、配置安装
./configure
make
sudo make install
4、安装libxml-dev
sudo apt-get install libxml2-dev
5、把libxml2下的libxml拷贝一份到libxml2所在的目录
#sudo cp -r /usr/include/libxml2/libxml /usr/include/libxml
6、编写完程序后,编译时,需要引用xml2库
g++ a.cpp -lxml2