安装Ubuntu遇到安装依赖包-问题
@ubuntu:~/C_Program$ sudo apt-get install ubuntu-make
Reading package lists... Done
Building dependency tree
Reading state information... Done
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-0ubuntu0.14.04.1 is to be installed
code-insiders:i386 : Depends: libnotify4:i386 but it is not going to be installed
Depends: libnss3:i386 but it is not going to be installed
Depends: apt:i386 but it is not going to be installed
Depends: libxkbfile1:i386 but it is not going to be installed
Depends: libgconf-2-4:i386 but it is not going to be installed
ubuntu-make : Depends: python3-argcomplete but it is not going to be installed
Depends: python3-bs4 but it is not going to be installed
Depends: python3-gnupg but it is not going to be installed
Depends: python3-progressbar but it is not going to be installed
Depends: python3-yaml but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Ubuntu 下阅读代码,所以还需要在 Ubuntu 下安装 VSCode;VSCode 有 Windows、Linux 和macOS 三个版本的,是一个跨平台的编辑器。VSCode 下载地址是:https://code.visualstudio.com/;
Linux 版本安装
我们有时候也需要在 Ubuntu 下阅读代码,所以还需要在 Ubuntu 下安装 VSCode;
在 Ubuntu 中 Visual Studio Code
要在 Ubuntu 14.04/14.10/15.04 Linux 发行版中安装 Visual Studio Code,我们可以使用 Ubuntu Make 0.7。这是在 ubuntu 中安装 code 最简单的方法,因为我们只需要执行几个命令。首先,我们要在我们的 ubuntu linux 发行版中安装 Ubuntu Make 0.7。要安装它,首先要为它添加 PPA。可以通过运行下面命令完成。
# sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
# sudo apt-get update
# sudo apt-get install ubuntu-make
ubuntu使用”apt-get install“安装程序时遇到错误提示: you might want to run 'apt-get -f install' to correct these;
问题描述:
ubuntu使用”apt-get install“安装程序时遇到错误提示
you might want to run 'apt-get -f install' to correct these
解决方案:
使用如下命令修复安装包(不过在我遇到的问题中没有起作用)
$ sudo apt-get --fix-broken install
或者使用命令
$ sudo dpkg --purge xxx
其中xxx为安装失败的程序,错误提示中会给出其名称,不过也有可能是错误提示中未给出的,但之前安装的确出错的程序。
在我们的 ubuntu 操作系统上安装完 Ubuntu Make 之后,我们可以在一个终端中运行以下命令来安装 Code。
Umake Web Code
运行完上面的命令之后,会要求我们输入想要的安装路径。然后,会请求我们允许在 ubuntu 系统中安装 Visual Studio Code。我们输入“a”(接受)。输入完后,它会在 ubuntu 机器上下载和安装 Code。最后,我们可以在启动器或者菜单中启动它。
总结
我们已经成功地在 Linux 发行版上安装了 Visual Studio Code。在所有 linux 发行版上安装 Visual Studio Code 都和上面介绍的相似,我们也可以使用 umake 在 Ubuntu 发行版中安装。Umake 是一个安装开发工具,IDEs 和语言的流行工具。我们可以用 Umake 轻松地安装 Android Studios、Eclipse 和很多其它流行 IDE。Visual Studio Code 是基于 Github 上一个叫 Electron 的项目,它是 Atom.io 编辑器的一部分。它有很多 Atom.io 编辑器没有的改进功能。当前 Visual Studio Code 只支持 64 位 linux 操作系统平台。