英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论