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命令查看状态:
在这里插入图片描述在这里插入图片描述
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就可以了:
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值