Did 1) as suggested did '$ which dpkg' and got nothing - just returns to cursor did '$ which wget' and got nothing - just returns to cursor
Did 2) '$ wget' and got 'bash: wget: command not found'
Didn't do 3), was this reliant on 2) ? you'll need to forgive me I'm a newbie and didn't really understand your instructions, but thanks anyway.
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'.
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.)
- 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)
- Download the apt deb:
$ wget http://www.mirror.ac.uk/mirror/archive.ubuntu.com/ubuntu/pool/main/a/apt/apt...
[previous command all on one line]
- 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.
'$ which dpkg' and got nothing - just returns to cursor '$ which wget' and got nothing - just returns to cursor
this means that it didnt find the command. If you are used to M$ DOS then the path is normally c:\windows\system32
try the commands find / -name dpkg find / -name wget
if this comes back with "not found" then cd /sbin and then issue the commands with a dot slash in front ./find / -name dpkg ./find / -name wget
or cd into /bin /usr/sbin /usr/bin or /usr/local/bin
and I hope we can find the commands.
Is this as a user or root you are doing this? If its a user the "su minus" which gets you to root with roots environment. su -
and then try the "which dpkg" and such like again.
Keith