如何安装 gvim?

cro*_*don 27 gvim

我做了以下工作:

sudo apt-get install vim-gnome
Run Code Online (Sandbox Code Playgroud)

但我得到以下信息:

vim-gnome : Depends: libruby1.8 (>= 1.8.7.352) but 1.8.6.111-2ubuntu1 is to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)

我弄完了:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Run Code Online (Sandbox Code Playgroud)

我的 /etc/apt/sources.list 文件的内容:

deb http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric main restricted
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ oneiric universe
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric universe
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric multiverse
deb http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ oneiric-updates multiverse
deb http://security.ubuntu.com/ubuntu oneiric-security main restricted
deb-src http://security.ubuntu.com/ubuntu oneiric-security main restricted
deb http://security.ubuntu.com/ubuntu oneiric-security universe
deb-src http://security.ubuntu.com/ubuntu oneiric-security universe
deb http://security.ubuntu.com/ubuntu oneiric-security multiverse
deb-src http://security.ubuntu.com/ubuntu oneiric-security multiverse
Run Code Online (Sandbox Code Playgroud)

但一切都无济于事。我总是得到上面相同的错误。

我能做些什么来解决?

0x9*_*x90 29

以下对我有用:

运行这个

sudo apt-get update 
Run Code Online (Sandbox Code Playgroud)

然后运行

sudo apt-get install vim-gnome 
Run Code Online (Sandbox Code Playgroud)

  • @Zanna 谢谢,在 Ubuntu 20.04 及更高版本上使用 `sudo apt install vim-gtk3`。 (5认同)
  • 请参阅 [此答案](https://askubuntu.com/a/1234566/527764) 了解最新版本的 Ubuntu 没有此软件包 (2认同)

小智 26

在 Ubuntu 20.04 上(自vim-gnome19.10 中删除):

sudo apt install vim-gtk3
Run Code Online (Sandbox Code Playgroud)


jco*_*ado 7

你需要检查你的来源。我看到它libruby1.8 1.8.7.352-2是可用的,main而您拥有的最新版本似乎是:1.8.6.111-2ubuntu1. 这可能意味着你dist-upgrade失败了或者你仍然需要update你的来源。

$ apt-cache policy libruby1.8
libruby1.8:
  Installed: 1.8.7.352-2
  Candidate: 1.8.7.352-2
  Version table:
 *** 1.8.7.352-2 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
        100 /var/lib/dpkg/status
Run Code Online (Sandbox Code Playgroud)