E: Sub-process /usr/bin/dpkg returned an error code (1)

Asked by vinit tiwari on 2010-06-21

Two days ago i was upgraded from ubuntu 9.10 to 10.04. when the upgrade was installing due to electricity problem my pc turned off and upgrade was interrupted in middle.
Then on the next day when i started my pc I found 10.04 installed in my pc but with some problems:
1. i have to manually start the x server every time I login by typing "startx" at a black screen after login.
2. there are 409 unattended upgrades.
3. I am not able to install any new package.
4. My PC is running very slow.
5. some of the installed softwares are also not working properly.

I will be grateful to you if you suggest me any solution and I am new to linux world.

Thanks in Advance.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu dpkg Edit question
Assignee:
No assignee Edit question
Last query:
2010-06-21
Last reply:
2010-06-22
Sam_ (and-sam) said : #1

Could it be your disk is full?
Try to clean up first.
sudo apt-get clean
sudo apt-get autoremove

Next, please try each as single step until errors occur and post output here:
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade
sudo apt-get -f install

You can also try to repair packages via recovery mode (boot menu).
To see the boot menu press 'shift' key.
http://unixlab.blogspot.com/2009/08/exploring-ubuntu-recovery-mode.html

https://help.ubuntu.com/community/Grub2

To fully check and upgrade your system using terminal using command line,
open a Terminal from the menu Applications->Accessories->Terminal

Tip: right click with mouse on the terminal title caption and select the item "Always on Top" doing this you will force the terminal window to stay on top of the other windows and you will find very easy to copy single row from this web page into the terminal...
Something more about using the terminal https://help.ubuntu.com/community/UsingTheTerminal

Then type or better copy and paste a row a time then press enter:
(Tip: select the single row to copy then right click into the terminal and to quick paste click with middle button of mouse )

sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get --fix-missing install
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get clean
sudo apt-get autoremove
sudo apt-get update

give your user password when requested, you don't see nothing when you type it, then press enter.

Hope this helps

Can you help with this problem?

Provide an answer of your own, or ask vinit tiwari for more information if necessary.

To post a message you must log in.