How to compile virt-manager and virtinst locally and test them in an arbitrary directory

I've only found instructions on how to compile and install these in /usr, but I wanted to test the latest version before I install it for all users. Here's how to do it.

wget 'http://virt-manager.org/download/sources/virt-manager/virt-manager-0.8.5.tar.gz'
tar xzf virt-manager-0.8.5.tar.gz
sudo apt-get build-dep virt-manager
VMINSTALLPATH=$(pwd)/virt-manager
mkdir -p "${VMINSTALLPATH}"
cd virt-manager-0.8.5
./configure --prefix="${VMINSTALLPATH}"
make
make install
cd ..

wget 'http://virt-manager.org/download/sources/virtinst/virtinst-0.500.4.tar.gz'
tar xzf virtinst-0.500.4.tar.gz
sudo apt-get build-dep virtinst
VIINSTALLPATH=$(pwd)/virtinst
mkdir -p "${VIINSTALLPATH}"
cd virtinst-0.500.4
python setup.py install --prefix="${VIINSTALLPATH}"

cd ..
export PYTHONPATH="${VIINSTALLPATH}/lib/python2.6/site-packages"
"${VMINSTALLPATH}/bin/virt-manager"

If you compile a version that is far from the one in your repositories, then you might have to manually install the prerequisites (instead of installing them via apt-get build-dep ...).

Syndicate content