34

I have done the following:

sudo apt-get install vim-gnome

But I get the following:

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.

I've done:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Contents of my /etc/apt/sources.list file:

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

But all to no avail. I always get the same error above.

What can I do to resolve?

croceldon
  • 575
  • 2
  • 5
  • 10
  • I wonder why is your libruby still at 1.8.6? The ubuntu repositories contain 1.8.7 (http://packages.ubuntu.com/oneiric/libruby1.8). Are you using the main repository? Enter `gnome-control-center software` and see the „Download from” setting. – lgarzo Nov 09 '11 at 15:50
  • It's set to download from Server for United States. – croceldon Nov 09 '11 at 15:54
  • does running `sudo dpkg --configure -a` help? – Ciaran Liedeman Nov 09 '11 at 15:58
  • You can try to set it to „Main server” and do an update, just to exclude the case that your repository is not up-to-date. If it does not help set it back, it eases the load on the main servers. – lgarzo Nov 09 '11 at 16:04
  • Changing to main server didn't help. it allowed dist-upgrade to run without any errors, but I still have the same situation when trying to install vim – croceldon Nov 09 '11 at 17:45
  • Can you edit your question with the contents of /etc/apt/sources.list? – Jorge Castro Nov 09 '11 at 17:48
  • Could you run `dpkg --get-selections | grep libruby` and update the question with the output? – lgarzo Nov 10 '11 at 10:07

5 Answers5

36

On Ubuntu 20.04 (since vim-gnome was removed in 19.10):

sudo apt install vim-gtk3
muru
  • 193,181
  • 53
  • 473
  • 722
Mudassir
  • 461
  • 4
  • 5
30

The following worked for me:

run this

sudo apt-get update 

and then run

sudo apt-get install vim-gnome 
0x90
  • 525
  • 2
  • 6
  • 13
  • 2
    See [this answer](https://askubuntu.com/a/1234566/527764) for recent versions of Ubuntu that don't have this package – Zanna Jan 06 '21 at 14:22
  • 6
    @Zanna thanks, `sudo apt install vim-gtk3` on Ubuntu 20.04 and above. – 0x90 Jan 08 '21 at 11:24
7

You'll need to check your sources. I see that libruby1.8 1.8.7.352-2 is available through main while it seems that the newest version you have is: 1.8.6.111-2ubuntu1. This probably means that you dist-upgrade failed or that you still need to update your sources.

$ 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
jcollado
  • 9,498
  • 2
  • 27
  • 26
  • How do I update the sources? I've already tried doing the apt-get install update/upgrade... The dist-upgrade fails with the same error I posted in the original question. – croceldon Nov 09 '11 at 15:55
  • From which distribution are you upgrading? That should help to know if there's any known problem. I've checked the `libruby1.8` package version in natty and looks like you're upgrading from an older distribution. – jcollado Nov 09 '11 at 16:51
  • I'm afraid you're getting over my head. I can't even remember what I've upgraded (I've done several upgrades on this little used installation). – croceldon Nov 09 '11 at 17:44
  • Looking at [hardy](https://launchpad.net/ubuntu/hardy/+package/libruby1.8) and [intrepid](https://launchpad.net/ubuntu/intrepid/+package/libruby1.8), I'd say that you're getting a version from hardy (you could still see that using `apt-cache policy libruby1.8` as I did above anyway). The recommended upgrade path would be upgrade to the next LTS and later to the next following distro: 8.04 (LTS) -> 10.04 (LTS) -> 10.10 -> 11.04 -> 11.10. Those are probably too many upgrades, so I'd advice to backup your home directory and install oneiric 11.10 from scratch. – jcollado Nov 10 '11 at 05:20
4

in Ubuntu 16.04 it should be:

sudo apt update

and then

sudo apt install vim-gnome
ChaosPredictor
  • 502
  • 4
  • 12
2

What worked for me :

sudo apt remove vim-common
sudo apt-get install vim-gnome
Ravexina
  • 54,268
  • 25
  • 157
  • 179