virsh: /usr/local/lib/libvirt.so.0: version
LIBVIRT_3.1.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: version
LIBVIRT_3.0.0’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: versionLIBVIRT_3.4.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: version
LIBVIRT_1.3.3’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: versionLIBVIRT_2.0.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: version
LIBVIRT_PRIVATE_3.6.0’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: versionLIBVIRT_PRIVATE_3.6.0' not found (required by /usr/lib/x86_64-linux-gnu/libvirt-lxc.so.0) virsh: /usr/local/lib/libvirt.so.0: version
LIBVIRT_PRIVATE_3.6.0’ not found
(required by /usr/lib/x86_64-linux-gnu/libvirt-qemu.so.0)
1.把这个文件和它的链接文件全删了:libvirt.so.0;
cd /usr/local/lib/
rm libvirt.so.0
rm libvirt.so.0.1003.1
2.这个时候使用virsh可以进入virsh的命令行,但是virsh list
会报错:
error: failed to connect to the hypervisor error: Failed to connect
socket to ‘/var/run/libvirt/libvirt-sock’: No such file or directory
3.使用systemctl start libvirtd
命令启动服务,使用systemctl status libvirtd
命令查看状态:
4.运行命令还是有问题,这个是有可能是有一些安装包没有装(图2也有提示是qemu的问题,安装它):
apt install qemu
5.virsh list 可以使用了。
6.如果打开virt-manager 报告:
Unable to connect to libvirt. Verify that: - The ‘libvirt-bin’ package is installed - The 'libvir
意思就是这些东西都安装了,但是没有连接,只需要双击下面的QEMU/KVM就可以了: