我是靠谱客的博主 繁荣季节,最近开发中收集的这篇文章主要介绍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
解决:
- 将iptables用iptables-legacy替换:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
- 开启 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 has not been booted with systemd as init system (PID 1). Can‘t operate.所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复