You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your Windows build number: (Type ver at a Windows Command Prompt)
Microsoft Windows [Version 10.0.16299.248]
What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)
[me@pc]$ sudo snap list
error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: no such file or directory
[me@pc]$ snap install swift
error: cannot communicate with server: Post http://localhost/v2/snaps/swift: dial unix /run/snapd.socket: connect: no such file or directory
[me@pc]$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps: dial unix /run/snapd.socket: connect: no such file or directory
Same as #2374 (message), which went dark without resolution. The title in the issue over there is unfortunate, but the take-away in the OP was quoth: "Any snap command fails" (as opposed to installation related). You don't have snapd running, so snap has no one to talk to on /run/snapd.socket. snapd doesn't start automatically after install because #994, but that is not unique to snapd. Going down the path of starting snapd manually could be taken up in the dupe issue if motivated. I gather someone made a run at it, anyway.
But snapd should be a base objective for wsl 2 before it's released given how much stuff is now only available on snaps. (and yes that means systemd running)
Ya, well in the latest insider builds, Angular ng serve just hangs on start.... so docker remote containers don't work right, WSL doesn't work because of Angular not working, Kubernetes is a hack at best...
sunliusi Thanks it works. I've tried this and working.
Btw I've tried this script: https://github.com/DamionGans/ubuntu-wsl2-systemd-script
And after restart my wsl2 was mess
Hello,
I ran:
"sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME"
and I'm getting:
Get:7 https://esm.ubuntu.com/infra/ubuntu bionic-infra-updates InRelease [7,457 B]
Err:8 https://cloud.r-project.org/bin/linux/ubuntu -cran40/ Release
404 Not Found [IP: 2600:9000:200c:a600:6:c2d3:f940:93a1 443]
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Hit:10 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
E: The repository 'https://cloud.r-project.org/bin/linux/ubuntu -cran40/ Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Any ideas?
**Update:
I restarted from powershell, now I'm getting that: sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
Activity
therealkenc commentedon Feb 21, 2018
Same as #2374 (message), which went dark without resolution. The title in the issue over there is unfortunate, but the take-away in the OP was quoth: "Any snap command fails" (as opposed to installation related). You don't have
snapdrunning, sosnaphas no one to talk to on/run/snapd.socket.snapddoesn't start automatically after install because #994, but that is not unique tosnapd. Going down the path of startingsnapdmanually could be taken up in the dupe issue if motivated. I gather someone made a run at it, anyway.reesericci commentedon May 28, 2019
I need snap to install nextcloud
JohnGalt1717 commentedon Oct 28, 2019
...And Kubernetes
Biswa96 commentedon Oct 28, 2019
With some hacky tricks, snapd can be run in WSL2 which is currently in Fast Insider Builds. See this forum post https://forum.snapcraft.io/t/snapd-on-wsl2-insiders-only-for-now/13033.
For Docker + Kubernetes, there are some blog post:
JohnGalt1717 commentedon Oct 28, 2019
Looks like the root Kubernetes issue will be resolved with this: https://engineering.docker.com/2019/10/new-docker-desktop-wsl2-backend/
In a few weeks.
But snapd should be a base objective for wsl 2 before it's released given how much stuff is now only available on snaps. (and yes that means systemd running)
JohnGalt1717 commentedon Oct 28, 2019
Ya, well in the latest insider builds, Angular ng serve just hangs on start.... so docker remote containers don't work right, WSL doesn't work because of Angular not working, Kubernetes is a hack at best...
Long way to go.
therealkenc commentedon Oct 29, 2019
Or a
snapdthat is less sensitive to existencesystemd.PavelSosin-320 commentedon Dec 17, 2019
Maybe, somebody knows how to install working version of helm without snap untill this issue will be corrected in WSL 2.0 ?
sunliusi commentedon Jul 4, 2020
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
snap version
JohnGalt1717 commentedon Jul 6, 2020
sunliusi Yuk. It works, but why isn't this enabled by default on Ubuntu?
sunliusi commentedon Jul 6, 2020
While WSL2 has many improvements, it still has some limitations
kevinmahrous commentedon May 19, 2021
sunliusi Yay! worked. Thank you so much. :)
igortas commentedon May 20, 2021
sunliusi Thanks it works. I've tried this and working.
Btw I've tried this script:
https://github.com/DamionGans/ubuntu-wsl2-systemd-scriptAnd after restart my wsl2 was mess
thusinh1969 commentedon Aug 23, 2021
Not working with latest WSL2. Crashed immediately the terminal :( !!!
UnlimitedBurst commentedon Oct 12, 2021
That works. Thank you very much
frastlin commentedon Jan 7, 2022
Hello,
I ran:
"sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME"
and I'm getting:
Any ideas?
**Update:
I restarted from powershell, now I'm getting that:
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target"sudo: daemonize: command not found"
Installing daemonize doesn't work because I can't reach the app repository.
How does this script look, does manually installing daemonize sound like the best option here?
https://gist.github.com/dtjm/508978
adamlahbib commentedon Apr 16, 2022
Still works! Thanks!