System has not been booted with systemd as init system (PID 1). Can‘t operate.

简介: System has not been booted with systemd as init system (PID 1). Can‘t operate.

win11 安装Ubuntu 222.04LST 启动docker报错

System has not been booted with systemd as init system (PID 1). Can't operate.

执行

# service --status-all
# 启动守护dockerd
sudo dockerd

显示

failed to start daemon: Error initializing network controller: error obtaining controller instance: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain:  (iptables failed: iptables --wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.7 (nf_tables):  RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1

解决:

  1. 将iptables用iptables-legacy替换:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
  1. 开启 ipv4 的包转发功能:
sudo sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/g' /etc/sysctl.conf
# 启动Docker
sudo service docker start


相关文章
|
1月前
|
开发工具
【云手机】(systemctl)解决:System has not been booted with systemd as init system (PID 1). Can't ope...
【云手机】(systemctl)解决:System has not been booted with systemd as init system (PID 1). Can't ope...
1812 0
|
10天前
|
Java Linux Spring
`systemd` 中的 Unit 和 Target 是什么?
【6月更文挑战第12天】这篇我们来了解一下 systemd 的服务配置文件中 [Unit] 和 [Install] 这两部分内容和涉及到的概念。
32 4
|
1月前
|
Ubuntu Linux
Ubuntu 报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.
系统未使用 `systemd` 初始化导致错误。解决方法是通过 `apt` 安装。首先备份并更换`sources.list`,添加阿里云镜像源,然后更新源并以管理员权限运行 `apt-get install systemd -y` 和 `apt-get install systemctl -y` 安装所需组件。
|
7月前
zabbix-agent问题提示interrupted system call
zabbix-agent问题提示interrupted system call
98 0
|
7月前
System.exit(0)和System.exit(1)区别
System.exit(0)和System.exit(1)区别
|
8月前
|
Windows
Windows 11 蓝屏 Stop code - SYSTEM SERVICE EXCEPTION What failed - igdkmd64.sys
Windows 11 蓝屏 Stop code - SYSTEM SERVICE EXCEPTION What failed - igdkmd64.sys
|
Linux Docker 容器
docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.
docker报错:System has not been booted with systemd as init system (PID 1). Can‘t operate.
1134 0
启动报错“An operating system wasn't found”
分享一个启动报错“An operating system wasn't found”的案例
启动报错“An operating system wasn't found”