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

My WSL broke down: /usr/sbin/daemonize: No such file or directory

$
0
0

I created this following the instructions of official kubernetes site: https://kubernetes.io/blog/2020/05/21/wsl-docker-kubernetes-on-the-windows-desktop/

My WSL is not working now. It is stuck at the prompt:/usr/sbin/enter-systemd-namespace: line 10: /usr/sbin/daemonize: No such file or directory

Kindly help. I am a beginner.

Create the enter-systemd-namespace

   sudo vi /usr/sbin/enter-systemd-namespace#!/bin/bashif [ "$UID" != 0 ]; then    echo "You need to run $0 through sudo"    exit 1fiSYSTEMD_PID="$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target$' | grep -v unshare | awk '{print $2}')"if [ -z "$SYSTEMD_PID" ]; then    /usr/sbin/daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target    while [ -z "$SYSTEMD_PID" ]; do        SYSTEMD_PID="$(ps -ef | grep '/lib/systemd/systemd --system-unit=basic.target$' | grep -v unshare | awk '{print $2}')"    donefiif [ -n "$SYSTEMD_PID" ] && [ "$SYSTEMD_PID" != "1" ]; then    if [ -n "$1" ] && [ "$1" != "bash --login" ] && [ "$1" != "/bin/bash --login" ]; then        exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a \            /usr/bin/sudo -H -u "$SUDO_USER" \            /bin/bash -c 'set -a; source "$HOME/.systemd-env"; set +a; exec bash -c '"$(printf "%q" "$@")"    else        exec /usr/bin/nsenter -t "$SYSTEMD_PID" -a \            /bin/login -p -f "$SUDO_USER" \            $(/bin/cat "$HOME/.systemd-env" | grep -v "^PATH=")    fi    echo "Existential crisis"fi

Viewing all articles
Browse latest Browse all 2810

Trending Articles



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