[ALUG] kubuntu apt-get not installed
Richard Lewis
richardlewis at fastmail.co.uk
Wed Jun 13 09:25:53 BST 2007
On Tuesday 12 June 2007 23:31:22 elc wrote:
> Tried what you suggested Adam, and got 'command not found' for aptitude
> install apt.
> Also had 'command not found' for sudo aptitude install apt.
> In fact I also tried commands ls, man, sudo, and they all returned
> 'command not found'.
>
>
> I look forward to any suggestions - elc
>
Your problem may well be disk errors, but in case you just want to get apt
installed (which will be handy for helping to diagnose other problems) try
this. (Note, however, that if your disk is /very/ broken, this is unlikely to
work.)
1) Check dpkg and wget are still available:
$ which dpkg
/usr/bin/dpkg
$ which wget
/usr/bin/wget
(if dpkg isn't there then, um, well I'm not sure what you'll do)
(if wget is unavailable then you can just use a web browser)
2) Download the apt deb:
$ wget
http://www.mirror.ac.uk/mirror/archive.ubuntu.com/ubuntu/pool/main/a/apt/apt_0.6.46.4ubuntu10_i386.deb
[previous command all on one line]
3) install it:
$ sudo dpkg -i apt_0.6.46.4ubuntu10_i386.deb
And then you should have apt back on your box which will mean you can
(re)install other useful things. e.g.:
$ sudo apt-get --reinstall install coreutils
May I also suggest smartmontools? To help diagnose any possible disk errors?
Also, you may like to run an fsck (filesystem check; see $ man fsck). The
easiest way to do this is to force one to be scheduled next time you boot.
(fsck is most effective when run in single user mode.)
$ sudo tune2fs -c 0 -i 30d -T 20070501
(This is a bit of a hack so I'd better explain: it makes tune2fs check the
drive on boot every every 30 days ["-i 30d"], tells it not to schedule tests
based on the number of times the drive has been mounted ["-c 0"] and tells it
that the last time it was checked was 1st May 2007 which, assuming your
computer's clock is about right, was more than 30 days ago; see also $ man
tune2fs)
This will do an fsck next time you boot.
Cheers,
Richard
PS. I've just read the rest of this thread more carefully and now my message
seems a bit unhelpful (seeing as how you don't seem to /any/ programs
available). But I've typed it now, so I'm going to send it anyway.
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Richard Lewis
http://www.richard-lewis.me.uk/
JID: ironchicken at jabber.earth.li
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
More information about the main
mailing list