Monday, 16 February 2015

Installation error or apt-get command stucked in middle of installation in ubuntu -- steps needed to execute

First,

Open new terminal check the process id using the command ps-a

Kill the process using kill command (kill process_id)

Give the following commands:
# rm /var/lib/apt/lists/lock
# rm /var/cache/apt/archives/lock
# rm -f /var/lib/dpkg/lock
# rm -f /var/cache/apt/archives/lock
# rm /var/lib/dpkg/lock

# dpkg --configure -a

And now proceed for new installation,

If any of the previous installations are still giving errors while installation
 use,
       sudo apt-get purge $(dpkg -l|grep ^rc|awk '{ print $2 }')
 and then,
# apt-get autoremove
# sudo apt-get install -f

If any debconf problem occurred while the command 
"sudo apt-get purge $(dpkg -l|grep ^rc|awk '{ print $2 }') " given likeerror message : DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable

give the command,
# rm /var/cache/debconf/*.dat

No comments:

Post a Comment