Friday, May 13, 2016

apt - Why is python-pip kept back in Ubuntu 14.04?



When I upgrade these days, I get this message:



$ sudo apt-get upgrade -y
Reading package lists... Done
Building dependency tree

Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
libhwloc-plugins linux-headers-generic linux-signed-generic
linux-signed-image-generic python-pip
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.


I don't understand why python-pip is kept back. Is it because I have updated it by pip already?




$ pip -V
pip 7.0.3 from /usr/local/lib/python2.7/dist-packages (python 2.7)


Is it safe now to upgrade python-pip with apt-get?






Update:




$ sudo apt-get install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-chardet-whl python-colorama-whl python-distlib-whl
python-html5lib-whl python-pip-whl python-requests-whl python-setuptools-whl
python-six-whl python-urllib3-whl
Recommended packages:
python-dev-all python-wheel

The following NEW packages will be installed:
python-chardet-whl python-colorama-whl python-distlib-whl
python-html5lib-whl python-pip-whl python-requests-whl python-setuptools-whl
python-six-whl python-urllib3-whl
The following packages will be upgraded:
python-pip
1 upgraded, 9 newly installed, 0 to remove and 4 not upgraded.
Need to get 1,193 kB of archives.
After this operation, 1,438 kB of additional disk space will be used.



When a package is marked as being 'kept back', this means that apt will not auto-update it as it now has a new, extra dependency that you never agreed to install.
When you install it specifically with sudo apt-get install python-pip, it returns the message saying that the following packages will be installed to satisfy the dependency requirements:



python-chardet-whl python-colorama-whl python-distlib-whl 
python-html5lib-whl python-pip-whl python-requests-whl python-setuptools-whl
python-six-whl python-urllib3-whl


These are all new packages that are not present on your system. Rather than assume you want them installed, apt 'holds back' the package until you specifically tell it to install it. If you don't mind these new packages being installed (you probably don't), then agree to the installation.




If you want to upgrade everything and don't mind installing any new dependencies, the command sudo apt-get dist-upgrade will install all upgrades and pull in any new dependencies required for the updated packages. Be careful because sometimes a new dependency means that an entire software package gets pulled in (e.g. gnome-desktop will require downloading and installing a bunch of dependencies).


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...