如何安装libvirt-go?(pkg-config)

huangapple go评论76阅读模式
英文:

How to install libvirt-go? (pkg-config)

问题

Libvirt是通过"dnf install"命令进行安装的。对于libvirt-go,可以使用以下命令进行安装:$ go get github.com/libvirt/libvirt-go。

如何更改PKG_CONFIG_PATH?或者如何正确安装libvirt-go?

英文:

Libvirt was installed with "dnf install". For libvirt-go - $ go get github.com/libvirt/libvirt-go.
As a result:
enter image description here

How I can change PKG_CONFIG_PATH? Or how to install libvirt-go right?

答案1

得分: 2

你需要安装libvirt开发包,例如在Fedora/RHEL/Centos上安装libvirt-devel,在Debian/Ubuntu上安装libvirt-dev。

libvirt-go的构建过程将使用'pkg-config'查询来确定其安装位置,因此如果你将其安装在非标准位置(例如/opt/libvirt),你可以执行'export PKG_CONFIG_PATH=/opt/libvirt/lib/pkgconfig',然后libvirt-go就能找到它。

英文:

You need to install the libvirt development package, eg libvirt-devel on Fedora/RHEL/Centos, or libvirt-dev on Debian/Ubuntu.

The libvirt-go build process will just query 'pkg-config' to find out where it is installed, so if you did have it installed in a non-standard location (eg /opt/libvirt), then you would do 'export PKG_CONFIG_PATH=/opt/libvirt/lib/pkgconfig' and then libvirt-go would find that.

huangapple
  • 本文由 发表于 2017年8月1日 23:35:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/45442034.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定