我是靠谱客的博主 繁荣季节,这篇文章主要介绍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

最后

以上就是繁荣季节最近收集整理的关于System has not been booted with systemd as init system (PID 1). Can‘t operate.的全部内容,更多相关System内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(109)

评论列表共有 0 条评论

立即
投稿
返回
顶部