Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build and install libvirt on Mac?

I referred to this article, but used more recent libraries. To be explicit, I downloaded libgpg-error-1.10, libgcrypt-1.5.0,gnutls-3.1.3 and libvirt-1.0.0

libgpg-error-1.10, libgcrypt-1.5.0 installed OK and when configure gnutls-3.1.3, an error comes:

configure: error:

* Libnettle 2.5 was not found. Note that you must compile nettle with gmp support.

What I want is to use libvirt's python binding(i.e. import libvirt in python). Could anyone explain how to get a useable python libvirt library?

like image 402
can. Avatar asked Dec 01 '22 21:12

can.


2 Answers

Your easiest options is probably using homebrew to install libvirt:

$ brew install libvirt

After that compiling the Python bindings for libvirt should be trivial.

like image 194
Pedro Romano Avatar answered Dec 06 '22 10:12

Pedro Romano


After you install libvirt with:

$ brew install libvirt

you can install the libvirt python bindings with pip:

$ pip install libvirt-python

like image 27
Flannon Avatar answered Dec 06 '22 09:12

Flannon