macleo's blog

孤独 和 赛跑

导航

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

昨天为了安装 mariadb ,不小心可能安装了sysinit的东西,在启动gogs服务时 报了这个错

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

找到了解决方案:

我的理解是这样的 linux 系统大致有两种管理服务的方式,一种是 sysinit 一种是 systemctl 

现在主流都是 systemd 这种方式了

安装什么不小心 装了 sysinit 这种东西。只看到屏幕 哗啦哗啦 看到好多remove...... remove 

事后回想 应该是那会,把systemd 给干成 sysinit 了。之后操作 就 莫名其妙的 出现 

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

这样的提示了。

解决方案:

apt-get iinstall systemd-sysv

装回来就是了。

只是很多时候,因为不够了解 不够清楚,导致走了很多弯路,浪费了很多时间。与搜到这里的诸位共勉 一同进步 吧

 

posted on 2024-08-10 12:11  macleo  阅读(2)  评论(0编辑  收藏  举报