I accidentally ended up deleting apt-get
from my system (It's an 64-bit Ubuntu 16.04 Server). I decided that I would just re-download it from here. However, when I tried to install it by issuing the following command, this happened:
dpkg -i apt_1.0.1ubuntu2.17_amd64.deb
Preparing to unpack apt_1.0.1ubuntu2.17_amd64.deb ...
Unpacking apt (1.0.1ubuntu2.17) over (1.0.1ubuntu2.17) ...
dpkg: dependency problems prevent configuration of apt:
apt depends on libapt-pkg4.12 (>= 0.9.16); however:
Version of libapt-pkg4.12:amd64 on system is 0.8.16~exp12ubuntu10.21.
libapt-pkg5.0:amd64 (1.6~alpha5) breaks apt (<< 1.1~exp14) and is installed.
Version of apt to be configured is 1.0.1ubuntu2.17.
dpkg: error processing package apt (--install):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.7.6.1-4) ...
Errors were encountered while processing:
apt
I'm not certain how to proceed, could anyone give me some help? Thanks.
libapt-pkg4.12
which was also available in the link you provided, then gracefully force remove apt in dpkg usedpkg --remove apt
, then first installlibapt-pkg4.12
https://packages.ubuntu.com/trusty/libapt-pkg4.12 then you can proceed now to install apt. – Yien Nov 30 '17 at 03:09apt
by typingdpkg --remove apt
and then I installlibapt-pkg4.12
. After that, I then install apt. Is this correct? – ssharma Nov 30 '17 at 03:11apt-get
deals with dependencies,dpkg
can't. Hence withdpkg
you need to install the required 'depends' first, or at the same time. – guiverc Nov 30 '17 at 03:13libapt-pkg5.0
. I'm not sure if I should remove this though. – ssharma Nov 30 '17 at 03:18dpkg -i apt_1.0.1ubuntu2.17_amd64.deb libapt-pkg4.12_amd64.deb
this will install it at the same time. – Yien Nov 30 '17 at 03:18libapt-pkg5.0
installed. I think this is a different version. I've tried to remove it, but it seems to have dependencies. – ssharma Nov 30 '17 at 03:23