4

この記事を参照しましたが、より最近のライブラリを使用しました。明確にするために、私は、、およびをダウンロード しlibgpg-error-1.10ましたlibgcrypt-1.5.0gnutls-3.1.3libvirt-1.0.0

libgpg-error-1.10libgcrypt-1.5.0インストール済みで、構成時gnutls-3.1.3にエラーが発生します。

構成:エラー:

* Libnettle2.5が見つかりませんでした。gmpをサポートするnettleをコンパイルする必要があることに注意してください。

私が欲しいのは、libvirtのpythonバインディング(つまりimport libvirt、python)を使用することです。誰かが使用可能なpythonlibvirtライブラリを取得する方法を説明できますか?

4

4 に答える 4

11

最も簡単なオプションは、おそらく自作を使用してインストールすることlibvirtです:

$ brew install libvirt

その後、Pythonバインディングのコンパイルはlibvirt簡単なはずです。

于 2012-10-30T10:52:36.263 に答える
7

libvirtをインストールした後:

$ brew install libvirt

pipを使用してlibvirtpythonバインディングをインストールできます。

$ pip install libvirt-python

于 2014-03-21T20:04:29.447 に答える
0

かなり新しいMacOSX10.10.5で次のコマンドを実行しました

bash-3.2$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
bash-3.2$ brew install libvirt
bash-3.2$ brew install libvirt-python
bash-3.2$ pip install libvirt-python
bash-3.2$ echo Instructions at http://stackoverflow.com/questions/13136884/how-to-build-and-install-libvirt-on-mac do not work.

bash-3.2$ sudo easy_install pip
bash-3.2$ pip install libvirt-python
bash-3.2$ echo typical python stuff up - when the install of a tool gets in your way - toss the tool
bash-3.2$ echo unless the tool has worked many many times before.
bash-3.2$ pip install pkg-config
bash-3.2$ brew install pkg-config
bash-3.2$ pip install libvirt-python
bash-3.2$ sudo pip install libvirt-python
bash-3.2$ 
于 2015-10-13T07:42:09.880 に答える
0

Andrewsソリューションは、1つ以上の変更で機能El Capitanします。これらのバージョンでは書き込みアクセスが許可されていないため、のパスを/usr/share指定する必要があります。たとえば、次のようになります。pkg-configlibvirt api

export PKG_CONFIG_PATH=/usr/local/Cellar/libvirt/4.3.0/lib/pkgconfig
于 2018-05-31T09:04:49.433 に答える