1
环境:Ubuntu 18.04

太长不看版

snap install code --classic

这一句就够了

探索过程

  • 一开始,看了一些网上的方法,貌似选择很多,但步骤都有些麻烦,跟着搜到的第一个试了一遍结果某一步把指令输错了没有成功。
  • 然后我尝试着"sudo apt-get install code",不行,但是给了个有用的提示:

    No apt package "code", but there is a snap with that name.
    Try "snap install code"
  • 然后我试着”snap install code“,得到如下提示:

    error:This revision of snap "code" was published using classic confinement and thus perform arbitrary system changes outside of the security sandbox that snaps are usually confined to, which may put your system at risk.
    
    If you understand and want to proceed repeat the command including --classic.

  哦,知道了。

  • 然后键入snap install code --classic,啪的一下很快就装好了。
  • 最后,键入code即可启动VSCode。
  • 祝编码顺利!

ngHackerX86
22 声望24 粉丝

000000