Is it possible to use dpkg to install apt? It was uninstalled accidentally. If not, how can I get apt without reinstalling Ubuntu?
Edit: The following is what I get when I try to install apt with dpkg...
root@ben-HP-ENVY-dv4-Notebook-PC:/home/ben/Downloads# sudo dpkg -i apt.deb(Reading
database ... 285851 files and directories currently installed.)
Preparing to replace apt 0.9.7.9+deb7u1 (using apt.deb) ...
Unpacking replacement apt ...
Setting up apt (0.9.7.9+deb7u1) ...
gpg: key B98321F9: "Squeeze Stable Release Key <[email protected]>" not changed
gpg: key 473041FA: "Debian Archive Automatic Signing Key (6.0/squeeze) <[email protected]>" not changed
gpg: key 65FFB764: "Wheezy Stable Release Key <[email protected]>" not changed
gpg: key 46925553: "Debian Archive Automatic Signing Key (7.0/wheezy) <[email protected]>" not changed
gpg: Total number processed: 4
gpg: unchanged: 4
Processing triggers for man-db ...
Yes I did it. I got into the same problem when I tried to install oracle-java7-installer with
It told me that I'm going to do a very harmful thing (Remember I'm running trusty unstable development release) but I said 'Yes do as I sak' and it started removing everything including itself 'apt' so I forced stopped it. Coming back to the question, just download apt from
http://packages.ubuntu.com/trusty/amd64/apt/download
replace trusty with your release name and then run
and that's it. It worked for at least.
You can try to find a deb package for it, and use
dpkg -i <package>
or for aptitude.Try to install the source code, as it was already installed, should resolve dependencies and inside de folder run:
https://packages.debian.org/source/stable/apt