my friend broke apt-get :(

Asked by Sam Cater

I gave my friend an ubuntu disc for his laptop. All went well until a few days ago. Whenever he tries to boot into linux, he gets an error message like 'apt-get is not installed, please install apt-get'. He then gets a console with root@computername

this seems pretty daft, as apt-get isnt available to install apt-get!

a fix would be nice, I have given him a liveCD to boot off, connect to the internet, and see if he can fix it like that somehow. Maybe use a chroot?

if you have a fix for him please email at <email address hidden> I will forward any responses anyway.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Sam Cater
Solved:
Last query:
Last reply:
Revision history for this message
Hanusz leszek (leszek-skynet) said :
#1

Hello,

If he deleted only the apt package, then it is recoverable. If not it would be easier to reinstall Ubuntu.

Howto:
He can boot with the liveCD,
then download the apt package for his Ubuntu version here: http://packages.ubuntu.com/ (a .deb file)

mount his root partition
copy the .deb file to the root partition.
chroot into the root partition.
install the apt package with: (replace theaptpackage with the correct name of the package he downloaded)
dpkg -i theaptpackage

reboot

Revision history for this message
Raúl González Duque (zootropo) said :
#2

Can't you just use aptitude instead of apt?

Revision history for this message
Best Sam Cater (wraund-deactivatedaccount) said :
#3

its ok, sort of, he fixed it by re-installing, his only real complaint is losing some game scores, but thats about it.

Thanks for the suggestions anyway, Ill keep them in mind in case he does it again