Ubuntu: Unable to update / Upgrade / install software


Thank you for taking the time to take a look at this, I have dug through other forums relating to this issue but can't seem to pinpoint the problem. I am fairly new to ubuntu command line as well - so i will do my best to keep up.

general info:

Distributor ID: Ubuntu  Description:    Ubuntu 14.04.3 LTS  Release:    14.04  Codename:   trusty  danger@danger-Samsung-DeskTop-System:~$  uname -a  Linux danger-Samsung-DeskTop-System 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux  

The error:

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

The process:

danger@danger-Samsung-DeskTop-System:~$ sudo apt-get update  Reading package lists... Done  danger@danger-Samsung-DeskTop-System:~$ sudo apt-get upgrade  Reading package lists... Done  Building dependency tree         Reading state information... Done  Calculating upgrade... Done  80 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.  Need to get 0 B/155 MB of archives.  After this operation, 11.6 MB of additional disk space will be used.  Do you want to continue? [Y/n] y  Extracting templates from packages: 100%  Preconfiguring packages ...  **E: Sub-process /usr/bin/dpkg returned an error code (2)**  danger@danger-Samsung-DeskTop-System:~$   

I had to cut out a bunch of the code as i need "at least 10 reputation to post more than 2 links" here. Any help would be appreciated.
I also get this error when attempting to install anything from the from Software center:

Package operation failed  The installation or removal of a software package failed.  installArchives() failed:   Extracting templates from packages: 75%  Extracting templates from packages: 100%    Extracting templates from packages: 75%  Extracting templates from packages: 100%    Extracting templates from packages: 75%  Extracting templates from packages: 100%  Error in function:   


Suspect disk problems:

First check available diskspace:

df -h  

No lines with 100% should be there in the column Use%

Second, check wether any of you regular filesystems are not mount read-only:

mount | egrep '^\/'  

If there is an 'ro' between the () instead of 'rw', solve that first.



Thank you kindly through your patient support throughout all of this, I got frustrated last night at 2am after a couple cocktails and decided to just reinstall. After many attempts at formatting, repartitioning, and getting write errors during the installation process It's beginning to look like it was an HD failure issue. One attempt finally made it through and I am able to install and update software now.

Thanks again!

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »