DEV Community


Snapd doesn't work on WSL2 Ubuntu20.04

Still alive
・1 min read

You can't install chromium browser on WSL2 Ubuntsu20.04 because Ubuntsu only support snap version.

chromium-browser --headless 

Command '/usr/bin/chromium-browser' requires the chromium snap to be installed.
Please install it with:

snap install chromium
error: cannot communicate with server: Post http://localhost/v2/snaps/chromium: dial unix /run/snapd.socket: connect: no such file or directory
Enter fullscreen mode Exit fullscreen mode

You can try this.

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
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

snap version
Enter fullscreen mode Exit fullscreen mode

Discussion (0)