virsh、virt-manager报错 version `LIBVIRT_3.1.0' not found`

virsh: /usr/local/lib/libvirt.so.0: version LIBVIRT_3.1.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: versionLIBVIRT_3.0.0’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: version LIBVIRT_3.4.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: versionLIBVIRT_1.3.3’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: version LIBVIRT_2.0.0' not found (required by virsh) virsh: /usr/local/lib/libvirt.so.0: versionLIBVIRT_PRIVATE_3.6.0’ not found (required by virsh) virsh:
/usr/local/lib/libvirt.so.0: version LIBVIRT_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: versionLIBVIRT_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命令查看状态:
virsh、virt-manager报错 version `LIBVIRT_3.1.0' not found`_第1张图片在这里插入图片描述
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就可以了:
virsh、virt-manager报错 version `LIBVIRT_3.1.0' not found`_第2张图片

你可能感兴趣的:(虚拟机,Linux)