方法一:
先是按照很多文章推荐方式安装,据说也是最便捷方式,即
sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
sudo umake web visual-studio-code
上述方法首先安装umake,之后通过umake安装vscode,结果发现安装失败,查询其他文章发现最后一行命令应该为
sudo umake ide visual-studio-code
再次运行,安装成功,但是却无法打开软件!软件图标是存在的,就是无论如何都不能运行,点击图标无反应。方法重复了两次均失败,不得已只能放弃。
方法二:
官网下载安装包,直接运行
sudo apt install ./code_1.29.1-1542309157_amd64.deb
结果显示错误如下:
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
code : Depends: libnss3 (>= 2:3.26) but 2:3.21-1ubuntu4 is installed
E: Unmet dependencies. Try using -f.
根据提示运行:
sudo apt-get -f in