3
The following packages have been kept back: click click-dev gir1.2-click-0.4 libclick-0.4-0 0

BUT

It's clear that all of these packages are either on hold somewhere, or are in some kind of conflict, or would cause conflict. I don't understand why or where. They are neither Locked in Synaptic, nor Held back by apt or aptitude.

I am curious as to why these packages are held back? I cannot get past this with apt-get dist-upgrade, or with apt-get --with-new-pkgs upgrade.

I am on Linux Mint 17.3.

apt-cache policy click click-dev gir1.2-click-0.4 libclick-0.4-0:

click:
  Installed: 0.4.42+16.04.20151229-0~467~ubuntu14.04.1
  Candidate: 0.4.43+16.04.20160203-0~606~ubuntu14.04.1
  Version table:
     0.4.43+16.04.20160203-0~606~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu/ trusty/main amd64 Packages
 *** 0.4.42+16.04.20151229-0~467~ubuntu14.04.1 0
        100 /var/lib/dpkg/status
     0.4.21.1ubuntu0.2 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     0.4.21.1 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty/main amd64 Packages
click-dev:
  Installed: 0.4.42+16.04.20151229-0~467~ubuntu14.04.1
  Candidate: 0.4.43+16.04.20160203-0~606~ubuntu14.04.1
  Version table:
     0.4.43+16.04.20160203-0~606~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu/ trusty/main amd64 Packages
 *** 0.4.42+16.04.20151229-0~467~ubuntu14.04.1 0
        100 /var/lib/dpkg/status
     0.4.21.1ubuntu0.2 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     0.4.21.1 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty/main amd64 Packages
gir1.2-click-0.4:
  Installed: 0.4.42+16.04.20151229-0~467~ubuntu14.04.1
  Candidate: 0.4.43+16.04.20160203-0~606~ubuntu14.04.1
  Version table:
     0.4.43+16.04.20160203-0~606~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu/ trusty/main amd64 Packages
 *** 0.4.42+16.04.20151229-0~467~ubuntu14.04.1 0
        100 /var/lib/dpkg/status
     0.4.21.1ubuntu0.2 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     0.4.21.1 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty/main amd64 Packages
libclick-0.4-0:
  Installed: 0.4.42+16.04.20151229-0~467~ubuntu14.04.1
  Candidate: 0.4.43+16.04.20160203-0~606~ubuntu14.04.1
  Version table:
     0.4.43+16.04.20160203-0~606~ubuntu14.04.1 0
        500 http://ppa.launchpad.net/ubuntu-sdk-team/ppa/ubuntu/ trusty/main amd64 Packages
 *** 0.4.42+16.04.20151229-0~467~ubuntu14.04.1 0
        100 /var/lib/dpkg/status
     0.4.21.1ubuntu0.2 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     0.4.21.1 0
        500 http://mirror.vutbr.cz/ubuntu/archive/ trusty/main amd64 Packages

DEBUG:

apt-get -o Debug::pkgProblemResolver=true install click click-dev gir1.2-click-0.4 libclick-0.4-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  python3-click-package
Suggested packages:
  ubuntu-app-launch-tools upstart-app-launch-tools
Recommended packages:
  debootstrap
The following packages will be REMOVED:
  python3-click
The following NEW packages will be installed:
  python3-click-package
The following packages will be upgraded:
  click click-dev gir1.2-click-0.4 libclick-0.4-0
4 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 146 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n] 

REPRODUCTION of the PROBLEM:

apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  click click-dev gir1.2-click-0.4 libclick-0.4-0
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.

AFTER FIX:

apt-get install click click-dev gir1.2-click-0.4 libclick-0.4-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
click-dev is already the newest version.
click-dev set to manually installed.
click is already the newest version.
libclick-0.4-0 is already the newest version.
libclick-0.4-0 set to manually installed.
gir1.2-click-0.4 is already the newest version.
gir1.2-click-0.4 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • Please edit your question and specify which distribution you're running (including its version), and where you installed click from if it didn't come from your distribution. – Stephen Kitt Mar 9 '16 at 15:44
  • @StephenKitt How do I know where the package came from? – Vlastimil Mar 11 '16 at 13:35
  • 1
    apt-cache policy click click-dev gir1.2-click-0.4 libclick-0.4-0 will tell you, and might even give some idea why they're being kept back. – Stephen Kitt Mar 11 '16 at 13:47
  • @StephenKitt I edited the question in order to give you the info – Vlastimil Mar 12 '16 at 6:17
  • Try running apt-get with the flag -o Debug::pkgProblemResolver=true.and please give the command and complete output. – Faheem Mitha Mar 12 '16 at 7:39
3

According to the poster, the following command works

apt-get -o Debug::pkgProblemResolver=true install click click-dev gir1.2-click-0.4 libclick-0.4-0

and gives the result

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following extra packages will be installed:
  python3-click-package
Suggested packages:
  ubuntu-app-launch-tools upstart-app-launch-tools
Recommended packages:
  debootstrap
The following packages will be REMOVED:
  python3-click
The following NEW packages will be installed:
  python3-click-package
The following packages will be upgraded:
  click click-dev gir1.2-click-0.4 libclick-0.4-0
4 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 146 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue? [Y/n]

So, no problem showed up when running an explicit apt-get install.

I asked the poster to run it without the debug flag to see whether it gave the same results, but apparently he had already run the debug version.

3

This happens when the dependencies of the identified packages changed and new packages need to be installed. We need to use dist-upgrade in order to install the new dependencies and upgrade the packages:

sudo apt-get dist-upgrade

checks for broken dependencies

apt-get check

Fix Broken Packages

apt-get -f install

remove .deb files for packages that are no longer installed on your system

apt-get autoclean

Put the desired package on hold

echo "<package_name> hold" | dpkg --set-selections

Reconfigure the named package:

dpkg-reconfigure <package_name>
  • That's one of the reasons it can happen, but not the only one. Another possibility is that one of the held-back packages' dependencies is not available yet (common when running, e.g. debian sid or testing). Yet another is when the held-back package(s) (or their dependencies) conflict with another already-installed or about-to-be-installed package. – cas Mar 11 '16 at 1:15
2

After upgrading versions/packages the error "The following packages have been kept back" can indeed happen every so often.

Either the packages were installed from another repository, or due to not so frequent packages errors, some dependency is not being satisfied, or other requirements that cannot be satisfied without user intervention, including the decision of major upgrades between somewhat incompatible versions of a particular package.

In some cases, it is enough to do an apt-get install packages names, in others it is necessary to add the missing repository.

Concerning you case, I found this thread:

Snappy developer tools

It seems the ubuntu-device-flash package in beta PPA needs the dependency package "click-ubuntu-policy" which could not be found in Trusty, add ppa:snappy-dev/tools then I think snappy-tools could be installed, could you help verify this solution and file a bug about this issue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.