缘起
记录Centos安装VsCode的过程,好记性不如烂笔头
安装步骤
安装软件
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo'
yum check-update
sudo yum install code
在命令终端以普通用户
输入如下code
,即可启动软件
常见问题
- You are trying to start Visual Studio Code as a super user which isn’t recommended. If this was intended, please add the argument
--no-sandbox
and specify an alternate user data directory using the--user-data-dir
argument.
解决方案:以普通用户执行程序
参考资料
- 官方安装教程:传送门