Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Ask Question
This question does not appear to be about
a specific programming problem, a software algorithm, or software tools primarily used by programmers
. If you believe the question would be on-topic on
another Stack Exchange site
, you can leave a comment to explain where the question may be able to be answered.
Closed
1 year ago
.
This post was edited and submitted for review
last year
and failed to reopen the post:
Original close reason(s) were not resolved
I'm trying to follow the Redis installation process that was discuss in this
article
of digital ocean, for in WSL(Windows Sub-System for Linux). The Ubuntu version installed is Ubuntu 18.04.
Everything in redis installation is fine but when I tried to run this
sudo systemctl start redis
I got this message.
System has not been booted with systemd as init system (PID 1). Can't operate.
Any Idea on what should I do with that?
Instead, use: sudo service redis-server start
I had the same problem, stopping/starting other services from within Ubuntu on WSL. This worked, where systemctl did not.
And one could reasonably wonder, "how would you know that the service name was 'redis-server'?" You can see them using service --status-all
–
–
–
–
–
sudo /etc/init.d/redis start
as of right now we do not have systemd in WSL
Or sometime it might be redis-server
, like:
>> sudo /etc/init.d/redis-server start
Starting redis-server: redis-server.
Just do a ls
, like: ls /etc/init.d
–
–
–
If you are using Docker, you may try an image that has Ubuntu with System D already active with this command:
docker run -d --name redis --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro jrei/systemd-ubuntu:18.04
Then you just need to run:
docker exec -it redis /bin/bash
and there you can just install Redis, start it, restart it or whatever you need.
Total newbie here - after trying most of the above suggestions, the command that worked for me was sudo service apache2 --full-restart
and the web server started up.
Maybe the error came up because I have been following lots of setup instructions without a reboot/restart. I'm working on Ubuntu 20.04 in WSL2 using Apache2 Debian.
For WSL2, I had to install cgroupfs-mount, than start the daemon, as described here:
sudo apt-get install cgroupfs-mount
sudo cgroupfs-mount
sudo service docker start