ubuntu - 无法在 ubuntu 上安装 Visual Studio 代码
问题描述
在 ubuntu 上安装 Visual Studio 代码时出现此错误。
我尝试了这些命令,前三个有效,但在第四个之后出现错误。
- sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
- sudo apt-get 更新
- sudo apt-get install ubuntu-make
umake web 视觉工作室代码
用法:umake web [-h] {firefox-dev,phantomjs} ... umake web:错误:参数框架:无效选择:'visual-studio-code'(从'firefox-dev','phantomjs'中选择)
解决方案
我不知道最后一个命令,根据ubuntu-make和https://askubuntu.com/a/616363/861358它应该是这样的:
umake ide visual-studio-code
请注意,官方文档中还介绍了其他安装 Visual Studio Code 的方法:
安装
基于 Debian 和 Ubuntu 的发行版
为基于 Debian/Ubuntu 的发行版安装 Visual Studio Code 的最简单方法是通过图形软件中心(如果可用)或通过命令行下载并安装.deb 包(64 位) :
sudo apt install ./<file>.deb # If you're on an older Linux distribution, you will need to run this instead: # sudo dpkg -i <file>.deb # sudo apt-get install -f
安装依赖项安装 .deb 包将自动安装 apt 存储库和签名密钥,以使用系统的包管理器启用自动更新。请注意,下载页面上也提供 32 位和 .tar.gz 二进制文件。
也可以使用以下脚本手动安装存储库和密钥:
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/ sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
然后更新包缓存并使用以下命令安装包:
sudo apt-get install apt-transport-https sudo apt-get update apt-get install code # or code-insiders
推荐阅读
- arrays - 如何使用 axios 为 Google 地图和 React 中的 placeid 获取数据?
- node.js - 护照加载时间长且无消息失败的身份验证表
- python-3.x - 为什么网络对测试中的每个输入给出相同的结果?
- c++ - 如何通过 stdstring 打印 ostream 变量的值?
- elasticsearch - 在elasticsearch中搜索字段
- jquery - ajax提交前显示提示
- c# - 编辑列表中的一行
并刷新 ListView - c - 带有“O_EXEC”的“open()”与“execve()”有何不同和相关?
- python - 数据框中的 .map(str) 和 .astype(str) 有什么区别
- git - Visual Studio - 没有合并 GUI,只有差异