vim-gtk3 Has Unmet Dependencies After `apt-get upgrade` In Ubuntu 16.04.1 Xenial

Bug #1613949 reported by Will Braswell
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Invalid
High
Unassigned

Bug Description

I have a fresh install of Ubuntu v16.04.1, then I did an `apt-get upgrade` and it only had a few seemingly-minor packages to upgrade (don't remember the list, sorry).

Apparently all the core vim packages have been upgraded to 2:7.4.1689-3ubuntu1.1 but vim-gtk3 (and all the other gvim-providing packages I tested) are still held back to 2:7.4.1689-3ubuntu1 so there is a version mis-match.

Now I get the following error:

[[[ BEGIN PASTE ]]]

root@machine:/# apt-get install vim-gtk3
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 vim-gtk3 : Depends: vim-common (= 2:7.4.1689-3ubuntu1) but 2:7.4.1689-3ubuntu1.1 is to be installed
            Depends: vim-runtime (= 2:7.4.1689-3ubuntu1) but 2:7.4.1689-3ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

[[[ END PASTE ]]]

However I can still get gvim working if I force the installation of the vim-gtk3 package using dpkg. Of course this is not a good solution, because it leaves my system in a state of seemingly-broken packages!

[[[ BEGIN PASTE ]]]

root@machine:/# dpkg -i --force-depends ./vim-gtk3_7.4.1689-3ubuntu1_amd64.deb
Selecting previously unselected package vim-gtk3.
(Reading database ... 251539 files and directories currently installed.)
Preparing to unpack .../vim-gtk3_7.4.1689-3ubuntu1_amd64.deb ...
Unpacking vim-gtk3 (2:7.4.1689-3ubuntu1) ...
dpkg: vim-gtk3: dependency problems, but configuring anyway as you requested:
 vim-gtk3 depends on vim-common (= 2:7.4.1689-3ubuntu1); however:
  Version of vim-common on system is 2:7.4.1689-3ubuntu1.1.
 vim-gtk3 depends on vim-runtime (= 2:7.4.1689-3ubuntu1); however:
  Version of vim-runtime on system is 2:7.4.1689-3ubuntu1.1.

Setting up vim-gtk3 (2:7.4.1689-3ubuntu1) ...
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/ex (ex) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/editor (editor) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gvim (gvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gview (gview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rgview (rgview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/rgvim (rgvim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/evim (evim) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/eview (eview) in auto mode
update-alternatives: using /usr/bin/vim.gtk3 to provide /usr/bin/gvimdiff (gvimdiff) in auto mode

[[[ END PASTE ]]]

And yes, I can confirm that gvim actually works using this method. We just need to upgrade the package versioning so that we don't have a problem with the apt-get packaging dependency system.

Thanks for all your hard work. Ubuntu is #1!!! :-)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vim (Ubuntu):
status: New → Confirmed
Changed in vim (Ubuntu):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote :

I was unable to recreate this today:

 $ sudo apt-get install vim-gtk3
[sudo] password for bdmurray:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-31 linux-headers-4.4.0-31-generic linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-generic linux-tools-4.4.0-31
  linux-tools-4.4.0-31-generic
Use 'sudo apt autoremove' to remove them.
Suggested packages:
  cscope vim-doc
The following NEW packages will be installed:
  vim-gtk3
0 upgraded, 1 newly installed, 0 to remove and 20 not upgraded.
Need to get 1,222 kB of archives.
After this operation, 2,948 kB of additional disk space will be used.
Get:1 http://192.168.10.7/ubuntu xenial-updates/universe amd64 vim-gtk3 amd64 2:7.4.1689-3ubuntu1.1 [1,222 kB]
Fetched 1,222 kB in 0s (10.6 MB/s)
Sorry, your system lacks support for the snapshot feature
Selecting previously unselected package vim-gtk3.
(Reading database ... 918193 files and directories currently installed.)
Preparing to unpack .../vim-gtk3_2%3a7.4.1689-3ubuntu1.1_amd64.deb ...
Unpacking vim-gtk3 (2:7.4.1689-3ubuntu1.1) ...
Setting up vim-gtk3 (2:7.4.1689-3ubuntu1.1) ...

Where did you get the old version of vim-gtk3?

Changed in vim (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Will Braswell (willthechill) wrote :

Hi Brian,

The following 4 commands work on my system to actually run gvim, although as I said before this leaves the packages in a broken state, so I still go ahead and run the purge command at the end to remove the broken (but working) package for now, until a proper solution is in place.

$ apt-get install liblua5.2 libruby2.3
$ wget http://mirrors.kernel.org/ubuntu/pool/universe/v/vim/vim-gtk3_7.4.1689-3ubuntu1_amd64.deb
$ dpkg -i --force-depends ./vim-gtk3_7.4.1689-3ubuntu1_amd64.deb
$ gvim

$ dpkg --purge vim-gtk3

Does this answer your question?

Thanks,
~ Will

Revision history for this message
Will Braswell (willthechill) wrote :

PS - I found the deb URL by the following steps:

1. Visit http://packages.ubuntu.com/
2. Search for "vim-gtk3" in xenial, which leads to http://packages.ubuntu.com/search?keywords=vim-gtk3&searchon=names&suite=xenial&section=all
3. Select the package which leads to http://packages.ubuntu.com/xenial/vim-gtk3
4. Select the amd64 arch which leads to http://packages.ubuntu.com/xenial/amd64/vim-gtk3/download
5. Select the first North America mirror which leads to http://mirrors.kernel.org/ubuntu/pool/universe/v/vim/vim-gtk3_7.4.1689-3ubuntu1_amd64.deb

Revision history for this message
Brian Murray (brian-murray) wrote : Re: [Bug 1613949] Re: vim-gtk3 Has Unmet Dependencies After `apt-get upgrade` In Ubuntu 16.04.1 Xenial

On Wed, Sep 14, 2016 at 07:03:22PM -0000, Will Braswell wrote:
> PS - I found the deb URL by the following steps:
>
> 1. Visit http://packages.ubuntu.com/
> 2. Search for "vim-gtk3" in xenial, which leads to http://packages.ubuntu.com/search?keywords=vim-gtk3&searchon=names&suite=xenial&section=all
> 3. Select the package which leads to http://packages.ubuntu.com/xenial/vim-gtk3
> 4. Select the amd64 arch which leads to http://packages.ubuntu.com/xenial/amd64/vim-gtk3/download
> 5. Select the first North America mirror which leads to http://mirrors.kernel.org/ubuntu/pool/universe/v/vim/vim-gtk3_7.4.1689-3ubuntu1_amd64.deb

My point is that isn't the latest version of vim-gtk3. You want
http://mirrors.kernel.org/ubuntu/pool/universe/v/vim/vim-gtk3_7.4.1689-3ubuntu1.1_amd64.deb

What does apt-cache policy vim-gtk3 say? In your original description
you said you installed the package via apt-get, was / is your mirror out
of date?

--
Brian Murray

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for vim (Ubuntu) because there has been no activity for 60 days.]

Changed in vim (Ubuntu):
status: Incomplete → Expired
Revision history for this message
zacktu (cannon) wrote :

I have the same symptoms as described here after upgrading from 14.04 to 16.04. I have always been a vi user. On this system vi links eventually to /usr/bin/vim.tiny, and I get the same error messages as described here.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 vim : Depends: vim-common (= 2:7.4.1689-3ubuntu1) but 2:7.4.1689-3ubuntu1.1 is to be installed
E: Unable to correct problems, you have held broken packages.

Revision history for this message
Will Braswell (willthechill) wrote :

Hello Mr. Murray,

Sorry for the delay, looks like we finally have confirmation from zaktu, here are the results of the command for which you asked:

$ apt-cache policy vim-gtk3
vim-gtk3:
  Installed: (none)
  Candidate: 2:7.4.1689-3ubuntu1
  Version table:
     2:7.4.1689-3ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Does this information help us move forward toward a fix?

Thanks,
~ Will

Changed in vim (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I suspect you don't have -updates enabled for universe in your /etc/apt/sources.list file. If you did you'd see the following:

 $ apt-cache policy vim-gtk3
vim-gtk3:
  Installed: (none)
  Candidate: 2:7.4.1689-3ubuntu1.1
  Version table:
     2:7.4.1689-3ubuntu1.1 500
        500 http://192.168.10.7/ubuntu xenial-updates/universe amd64 Packages
     2:7.4.1689-3ubuntu1 500
        500 http://192.168.10.7/ubuntu xenial/universe amd64 Packages

vim-common and vim-runtime are in main and you seem to have -updates enabled for that pocket.

Revision history for this message
zacktu (cannon) wrote :

My workaround was to rename ~/.vimrc effectively removing it. Now I can use vi with no error messages.

Revision history for this message
Will Braswell (willthechill) wrote :
Download full text (4.9 KiB)

Mr. Murray,

Without having yet added "universe-updates" (or anything else) to my /etc/apt/sources.list file, I went ahead and ran `apt-get update` and `apt-cache policy vim-gtk3` again, now it looks like things have been fixed (enough) for me to move forward as-is.

AND IT WORKS!

Unfortunately, it only works because of the passage of time (and things being fixed upstream, presumably); it WAS a problem when I originally created this ticket, and specifically that problem is that the default sources.list fails to include the proper "xenial-updates" lines.

There are 2 files which may be significant, "sources.list" and the older "sources.list.save" files. I will attach "sources.list", and their diff is below. Perhaps this bug report should be re-filed with the people who are in charge of the default "/etc/apt/sources.list" files???

Thanks,
~ Will

$ ls -l /etc/apt/sources.list*
-rw-rw-r-- 1 root root 2727 Nov 24 09:23 /etc/apt/sources.list
-rw-rw-r-- 1 root root 2827 Aug 16 12:12 /etc/apt/sources.list.save

# diff sources.list.save sources.list
6c6
< # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
---
> deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
27c27
< # deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
---
> deb-src http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
35d34
< deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
42c41
< # deb http://archive.canonical.com/ubuntu xenial partner
---
> deb http://archive.canonical.com/ubuntu xenial partner

$ apt-cache policy vim-gtk3
vim-gtk3:
  Installed: (none)
  Candidate: 2:7.4.1689-3ubuntu1.2
  Version table:
     2:7.4.1689-3ubuntu1.2 500
        500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
     2:7.4.1689-3ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

# apt-get update
...
# apt-get install vim-gtk3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  vim-gui-common
Suggested packages:
  cscope vim-doc vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2 | vim-athena-py2
The following NEW packages will be installed:
  vim-gtk3 vim-gui-common
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,290 kB of archives.
After this operation, 3,223 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-gui-common all 2:7.4.1689-3ubuntu1.2 [67.6 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 vim-gtk3 amd64 2:7.4.1689-3ubuntu1.2 [1,223 kB]
Fetched 1,290 kB in 2s (606 kB/s)
Selecting previously unselected package vim-gui-common.
(Reading database ... 333767 files and directories currently installed.)
Preparing to unpack .../vim-gui-common_2%3a7.4.1689-3ubuntu1.2_all.deb ...
Unpacking vim-gui-common (2:7.4.1689-3ubuntu1.2) ...
Selecting previously unselected package vim-gtk3.
Preparing to unpack .../vim-gtk3_2%3a7.4.1689-3ubuntu1.2_amd64.deb ...
Unpacking vim-gtk3 (2:7.4.1689-3ubuntu1.2) ....

Read more...

Revision history for this message
Will Braswell (willthechill) wrote :

Also, I'm pretty sure the issue experienced by user "zacktu (cannon)" is different than my issue.

Revision history for this message
Adam Conrad (adconrad) wrote :

This came about because you installed from -updates (possibly a point release ISO), and then disabled non-security updates, causing the local and remote packages to be mismatched until a security update trumped them both.

Definitely not a vim packaging bug.

Changed in vim (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.