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

WSL2 (Ubuntu) sudo snap install --classic code not working

$
0
0

I already had vscode installed 2 years ago, but I opened my wsl2 today after like 10 days and code . is giving following error (It was working fine till 10 days ago)

Command 'code' not found, did you mean:  command 'cde' from deb cde (0.1+git9-g551e54d-1.1build1)  command 'cdde' from deb cdde (0.3.1-1build1)  command 'node' from deb nodejs (10.19.0~dfsg-3ubuntu1)  command 'ode' from deb plotutils (2.6-10build1)  command 'tcode' from deb emboss (6.6.0+dfsg-7ubuntu2)Try: sudo apt install <deb name>

So I thought to reinstall VScode. However when I typed sudo snap install --classic code it is showing error: access denied (see 'snap help login')

systemctl status snapd.service is returning the following:-

● snapd.service - Snap Daemon     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)     Active: active (running) since Mon 2022-07-18 12:21:18 IST; 10min agoTriggeredBy: ● snapd.socket   Main PID: 689 (snapd)      Tasks: 18 (limit: 7474)     Memory: 44.4M     CGroup: /system.slice/snapd.service└─689 /usr/lib/snapd/snapd

(Yes systemctl does not work by default in WSL2, but I found a way to enable it)

snap version is returning the following

snap    2.48+20.04snapd   2.48+20.04series  16ubuntu  20.04kernel  5.10.102.1-microsoft-standard-WSL2

sudo snap refresh snapd isn't working too. Giving the same error as of snap install

Please help!


Viewing all articles
Browse latest Browse all 2827

Trending Articles



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