如何在Ubuntu 16.04上安装Visual Studio Code 1.3

时间:2020-03-05 15:28:16  来源:igfitidea点击:

Visual Studio Code是一种轻量级的免费开放源代码软件。
它为开发人员提供了新的工具选择,该工具结合了简单性和具有更多功能的代码编辑器的流线型体验。
它是一个功能强大的源代码编辑器,可在桌面环境上运行,可用于Windows,OS X和Linux等操作系统。

安装步骤

首先,我们需要从该下载最新的可用源程序包。
我们可以在这里获取最新的可用版本。

我为VS代码创建了一个文件夹,并其中下载了软件包。

root@ubuntu:~# mkdir /tmp/VSC
root@ubuntu:~# cd /tmp/VSC

下载程序包。

root@ubuntu:/tmp/VSC# wget https://az764295.vo.msecnd.net/stable/e6b4afa53e9c0f54edef1673de9001e9f0f547ae/VSCode-linux-x64-stable.zip
--2015-07-19 08:48:36-- https://az764295.vo.msecnd.net/stable/e6b4afa53e9c0f54edef1673de9001e9f0f547ae/VSCode-linux-x64-stable.zip
Resolving az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 2606:2800:11f:17a5:191a:18d5:537:22f9, 72.21.81.200
Connecting to az764295.vo.msecnd.net (az764295.vo.msecnd.net)|2606:2800:11f:17a5:191a:18d5:537:22f9|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 48262769 (46M) [application/zip]
Saving to: ‘VSCode-linux-x64-stable.zip’
VSCode-linux-x64-stable.zip 100%[==================================================================>] 46.03M 121MB/s in 0.4s
2015-07-19 08:48:36 (121 MB/s) - ‘VSCode-linux-x64-stable.zip’ saved [48262769/48262769]

现在,将软件包解压缩到/opt文件夹,并使该二进制文件可执行。
如果未使用apt install unzip安装,则可以安装unzip软件包。

root@ubuntu:/tmp/VSC# unzip VSCode-linux-x64-stable.zip -d /opt/
root@ubuntu:/tmp/VSC# chmod +x /opt/VSCode-linux-x64/code

请注意,系统应支持所有GUI软件包以使其运行。
请确保安装这些软件包以启用所有必需的库(如果不存在)。

apt-get install lib32z1 lib32ncurses5 dpkg-dev
apt-get install libgtk2.0-0
apt install libnotify-dev
apt install libnss3