Quantcast
Channel: Active questions tagged windows-subsystem-for-linux - Ask Ubuntu
Viewing all articles
Browse latest Browse all 2796

How to solve 'System has not been booted with systemd as init system (PID 1).'? I can't reboot Ubuntu

$
0
0

I've got a problem during setup of apache. I am using Ubuntu version 18.04. I don't know what made this problem appeared...

I will just list all my commands.

apt-get updateapt-get upgrade

I saw an error after I tried to upgrade:

E: Sub-process /usr/bin/dpkg returned an error code (1) 

To solve it or a solution I used some commands below:

vi usr/sbin/policy-rc.d

contents:

#!bin/shexit 101chmod +x /usr/sbin/policy-rc.ddpkg-divert --local --rename --add /sbin/initctlln -s /bin/true /sbin/initctl

These are from this documentation

apt-get install apache2apt-get install phpapt-get install libapache2-mod-phpapt-get install php-mbstringapt-get install php-gdapt-get install php-curl php-xmlapt-get install mariadb-server/usr/bin/mysql_secure_installationuse mysql;update user set plugin='' where User='root';flush privileges;exit;apt-get install php-mysqladdusera2ensite

I downloaded phpmyadmin.

After all these commands I wanted to reboot Ubuntu but it didn't work.After the command reboot I saw a message like this:

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

and for reboot -f:

Rebooting.Failed to reboot: Invalid argument

I am complete newbie... I have no idea what I should do

I just reinstalled Ubuntu and I got the same messages mentioned above, though I did nothing but just tried reboot after reinstalling.


Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>