Installing apt-get
Solution 1
of course you can do that, although it is strange that you missed that package/command ... Anyway, a manual way to do it is to download the package and to install it with dpkg, as follows:
-
grab the package from the web
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.0.1ubuntu2.17_amd64.deb -O apt.deb
Edit: Check for the latest source at http://security.ubuntu.com/ubuntu/pool/main/a/apt/?C=M;O=D
-
install it with dpkg
sudo dpkg -i apt.deb
2 (other). Alternative use of dkpg without sudo - I didn't know about these, included after comments-
pkexec dpkg -i apt.deb
if everything goes right, that should be enough.
Probably you may find that some dependencies are not satisfied, to deal with that you may need to create a folder (something like "apt-installer") and drop all the dependencies of the apt package there. The list of dependencies required will be shown by the dpkg output and the download process is similar to the one explained above. Last, if you don't feel confident of what you are doing, my suggestion is that you may want to do a fresh install of your system.
Cheers.
Solution 2
Now...
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_2.1.10ubuntu0.2_amd64.deb -O apt.deb
In the future this will likely 404 error as well, so remove the file name apt_2.1.10ubuntu0.2_amd64.deb -O apt.deb
and enter just the http://security.ubuntu.com/ubuntu/pool/main/a/apt/
part into a browser. Look for the most current version of the file, and change the path to it.
Related videos on Youtube
user3078335
Updated on September 18, 2022Comments
-
user3078335 over 1 year
The
apt-get
command and thesudo
command does not work for me.which apt-get
returns nothing. I checked by bin folder to make sure, and there is noaptget
. I however havewget
. Can I install apt-get withwget
? If not, how can I install it? -
Nonny Moose over 7 yearsGood one, but remember he said sudo didn't work either.
-
Byte Commander over 7 yearsIf only
sudo
does not work (which should get fixed as soon as possible!), you can try to replace it withpkexec
for the moment, i.e.pkexec dpkg -i apt.deb
-
Rho over 7 yearsOh dear! it is true! haha... without the sudo package everything is supposed to have the admin level, right? if that's so the only easy way that comes to my mind is to uncompress the .deb file and locate the new files and folders manually in their destination, with their proper permissions... but I'm only guessing here, at this point my "real life" solution is a fresh install. :) Thanks Byte! I didn't know about pkexec. Editing.
-
Emre Tapcı about 4 yearsIf the above
wget
command gets a404
error, trywget http://ftp.us.debian.org/debian/pool/main/a/apt/apt_1.8.2_amd64.deb -O apt.deb
-
AverageHelper over 3 years@EmreTapcı This one's also a 404
-
Admin over 3 yearsI see what you’re trying to say, but can you clean the answer up with a chronological, step-by-step process for people who have a similar problem in the future? 👍🏻
-
Y-B Cause about 3 yearsSounds clear enough
-
Gulzar over 2 yearsWhere should this be installed into?