3

On Ubuntu 14.04 I installed default packages for Libvirt and Virt-manager. But it does not show support for Debian "Jessie". So I downloaded virt-manager from its Home page. I followed the INSTALL notes and issued the command:

python setup.py install

everything went fine but when I try to execute the program it gives following error:

xxxxx@E7440 ~ $ virt-manager 
Traceback (most recent call last):
  File "/usr/share/virt-manager/virt-manager", line 34, in <module>
    from virtinst import util as util
  File "/usr/share/virt-manager/virtinst/__init__.py", line 37, in <module>
    from . import util
  File "/usr/share/virt-manager/virtinst/util.py", line 28, in <module>
    import libvirt
ImportError: No module named libvirt

although I have libvirt installed already as shown in the printout below:

ii  gir1.2-libvirt-glib-1.0                               0.1.6-1ubuntu2                                      amd64        libvirt glib mainloop integration
ii  libvirt-bin                                           1.2.2-0ubuntu13.1.16                                amd64        programs for the libvirt library
ii  libvirt-dev                                           1.2.2-0ubuntu13.1.16                                amd64        development files for the libvirt library
ii  libvirt-glib-1.0-0                                    0.1.6-1ubuntu2                                      amd64        libvirt glib mainloop integration
ii  libvirt-glib-1.0-dev                                  0.1.6-1ubuntu2                                      amd64        libvirt glib mainloop integration
ii  libvirt0                                              1.2.2-0ubuntu13.1.16                                amd64        library for interfacing with different virtualization systems

What am I missing?

2 Answers 2

1

The package you're looking for is python-libvirt. You've installed all the libvirt libraries, but not their python bindings.

A side note, you may have better luck doing pip install libvirt. This is Python's package manager, and allows you to upgrade the packages independent of the OS (language libraries in the OS repos are almost always very old).

1
  • Thanks. That did the trick. But now I am having another issue while creating the VM. I got Error starting installation: Namespace GtkVnc not available.
    – Black_Zero
    Feb 17, 2016 at 11:52
0

On Ubuntu and other Debian-based distros, apt-get build-dep installs the build-dependencies for a distro source package, in other words the packages that are needed to build the given source package.

$ apt-get build-dep virt-manager

This can be helpful when you're installing a version of something from source that there is an older distro package for. Often the dependencies of the older version are mostly the same, so this gets you many of them easily.

Of course the newer version of whatever it is you are installing may need newer versions of some of the dependencies, so you'll need to be prepared to pay attention to what packages were installed and uninstall them if you are going to manually install different versions.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .