I was upgrading Ubuntu to 10.04, when a tripswitch tripped, cutting power to the computer. When it was restarted, it booted into a command line prompt. Google tells me to try:

sudo dpkg --configure -a

This gets me a lot of output that ends with a list of packages. I can't tell you what the output is, as piping the output to more/less does not work (still just all scrolls by and moves to next prompt), and redirecting it to a file just results in an empty file.

Google also suggested:

sudo apt-get install -f

This also didn't work.

Is a fresh install the only solution at this point?

link|improve this question

if redirecting the output to a file results in an empty file try redirecting STDERR to STDOUT.. That might help.. Use this: $<command> 2>&1 | tee cmd_output.log This should redirect STDERR to STDOUT and capture it in cmd_output.log file. If we have the error message for either apt-get or dpkg command, we can try to fix it.. – Vinay May 23 '11 at 9:23
feedback

2 Answers

are you able to access the sources.list ?

if so, modified it

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

$ sudo kate /etc/apt/sources.list

find and replaced all instances of "karmic" with "lucid". I think you've done these steps.

Then, Update and upgraded again.

$ sudo apt-get update && sudo apt-get dist-upgrade

This process took a long time but did produce an error relating to kdelibs5. The details are not so important, but was fixed using the following command apt-get straight up said to try this

$ sudo apt-get -f install

If this part works for you, you can then resume your update. Again, using:

$ sudo apt-get dist-upgrade

After that, Fix other applications

$ sudo apt-get install parted

Then, reboot

$ sudo reboot

if you can't get it , fresh install will be better .

link|improve this answer
Doesn't work. Anything after sudo apt-get -f install just fails. – Macha Mar 28 '10 at 19:53
@Macha: But with what messages does it fail? – Bobby Jun 10 '10 at 9:10
feedback
sudo apt-get install --reinstall ubuntu-minimal
sudo apt-get install --reinstall ubuntu-desktop
link|improve this answer
apt-get refused to install anything. I had to reinstall in the end. – Macha Apr 7 '10 at 13:24
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.