WSL的CentOS7报错Failed to get D-Bus connection: Operation not permitted解决办法
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了WSL的CentOS7报错Failed to get D-Bus connection: Operation not permitted解决办法相关的知识,希望对你有一定的参考价值。
参考技术A WSL的CentOS7使用systemctl和service命令时报错 Failed to get D-Bus connection: Operation not permitted ,解决办法是更换systemctl文件
首先备份systemctl文件
然后执行
或者直接打开这个网站 https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py ,将页面的所有内容复制,再使用vim打开systemctl文件并粘贴进去保存
可能会出现卡顿
最后执行
centos7虚拟机 网卡启动失败报错 failed to start LSB Bring up/down
亲自尝试:
解决办法: 禁用NetworkManager
1、禁用NetworkManager服务
systemctl stop NetworkManager
2、永久关闭NetworkManager服务 systemctl disable NetworkManager
最后重启网卡,会发现可以正常启动并且可以ping通。
systemctl restart network
尝试查询状态并ping 百度
systemctl status network
[root@localhost] ping 114.114.114.114 PING 114.114.114.114 (114.114.114.114) 56(84) bytes of data. 64 bytes from 114.114.114.114: icmp_seq=1 ttl=128 time=73.8 ms 64 bytes from 114.114.114.114: icmp_seq=2 ttl=128 time=73.4 ms 64 bytes from 114.114.114.114: icmp_seq=3 ttl=128 time=80.5 ms 64 bytes from 114.114.114.114: icmp_seq=4 ttl=128 time=57.3 ms 64 bytes from 114.114.114.114: icmp_seq=5 ttl=128 time=68.6 ms 64 bytes from 114.114.114.114: icmp_seq=6 ttl=128 time=67.9 ms
以上是关于WSL的CentOS7报错Failed to get D-Bus connection: Operation not permitted解决办法的主要内容,如果未能解决你的问题,请参考以下文章
配置centos7解决 docker Failed to get D-Bus connection 报错
centos7虚拟机 网卡启动失败报错 failed to start LSB Bring up/down
CentOS7安装MySQL报错Failed to start mysqld.service: Unit not found解决办法
CentOS7 Failed to start LSB: Bring up/down
Windows11 WSL 打开Ubuntu 报错 WslRegisterDistribution failed with error: 0x800701bc
WSL启动报错WslRegisterDistribution failed with error: 0x8007019e