Since Windows10 20H1 has arrived, I decided to use WSL2 to prepare the Rails environment. I put Ubuntu 20.04LTS, and when I set it up, I stumbled and fell in an unexpected place.
--You can install Ruby --I was able to install Rails with gem --MariaDB was also installed --Let's start it normally
$sudo systemctl start mysql
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to create bus connection: Host is down
I got an error.
WSL2 doesn't seem to support systemd (strictly it seems to exist but has been disabled). Even if it is enabled, it cannot be started with PID 1, so systemctl cannot be used effectively.
I tried to refer to Hack using Systemd with WSL2. I decided to use the genie command, which seems to be the easiest of all. https://github.com/arkane-systems/genie/
There is a relatively long preparation, but in the end you will execute the following command.
sudo apt install systemd-genie
The following preparation memo
-Access Install .NET Core --Install dotnet-runtime-3.1 --Access wsl-translinux --Execute the script in the Quick install column --Execute the above command
As you can see when I run it, the installation fails with a 404 error. I wonder why there is no package for Ubuntu 20.04 LTS yet. What ...
Currently use Debian or Ubuntu 18.04 LTS.
Recommended Posts