Update Manager not working after power failures

Asked by Indian Art

Update Manager not working after power failures.

I had some improper shut-downs as my UPS is giving me some trouble. So the computer was unintentionally shut down when I was in the middle of some work.

I think this has corrupted some of the software. The icon "Shut down the computer" does not work sometimes. I need to shut down the computer from the power button. (which has been assigned to shut down by the 'Power Manager')

I occasionally get a message that the key was not unlocked at login and it asks for my password and when I give my password it goes away.

I cannot run update manager anymore.

When I ran $ sudo apt-get update in the terminal this is the output I got:

sp@sp-desktop:~$ sudo apt-get update
[sudo] password for sp:
Get:1 http://dl.google.com stable Release.gpg [189B]
Ign http://dl.google.com/linux/deb/ stable/main Translation-en_US
Get:2 http://dl.google.com stable Release [2,544B]
Hit http://ppa.launchpad.net lucid Release.gpg
Ign http://ppa.launchpad.net/robert-ancell/gcalctool/ubuntu/ lucid/main Translation-en_US
Hit http://ftp.usf.edu lucid Release.gpg
Ign http://ftp.usf.edu/pub/ubuntu/ lucid/main Translation-en_US
Get:3 http://dl.google.com stable/main Packages [1,061B]
Hit http://ppa.launchpad.net lucid Release
Ign http://ftp.usf.edu/pub/ubuntu/ lucid/universe Translation-en_US
Hit http://ftp.usf.edu lucid-updates Release.gpg
Ign http://ftp.usf.edu/pub/ubuntu/ lucid-updates/main Translation-en_US
Ign http://ftp.usf.edu/pub/ubuntu/ lucid-updates/universe Translation-en_US
Hit http://ftp.usf.edu lucid-security Release.gpg
Ign http://ftp.usf.edu/pub/ubuntu/ lucid-security/main Translation-en_US
Ign http://ftp.usf.edu/pub/ubuntu/ lucid-security/universe Translation-en_US
Hit http://ftp.usf.edu lucid Release
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ftp.usf.edu lucid-updates Release
Hit http://ftp.usf.edu lucid-security Release
Hit http://ftp.usf.edu lucid/main Packages
Hit http://ftp.usf.edu lucid/main Sources
Hit http://ftp.usf.edu lucid/universe Packages
Hit http://ftp.usf.edu lucid/universe Sources
Hit http://ftp.usf.edu lucid-updates/main Packages
Hit http://ftp.usf.edu lucid-updates/main Sources
Hit http://ftp.usf.edu lucid-updates/universe Packages
Hit http://ftp.usf.edu lucid-updates/universe Sources
Hit http://ftp.usf.edu lucid-security/main Packages
Hit http://ftp.usf.edu lucid-security/main Sources
Hit http://ftp.usf.edu lucid-security/universe Packages
Hit http://ftp.usf.edu lucid-security/universe Sources
Fetched 3,794B in 2s (1,496B/s)
Segmentation faultsts... 4%
sp@sp-desktop:~$

Please help.

Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Indian Art
Solved:
Last query:
Last reply:
Revision history for this message
Indian Art (goldfish-aol) said :
#1

"Synaptic Package Manager" is also not working.

Revision history for this message
Indian Art (goldfish-aol) said :
#2

I tried to follow the advice on Ubuntu Forums "It maybe a corrupted apt cache, open a terminal and remove the .bin files in /var/cache/apt:"

This is the output of the Terminal.

sp@sp-desktop:~$ sudo rm /var/cache/apt/*.bin
sp@sp-desktop:~$ sudo apt-get -update
E: Command line option 'p' [from -update] is not known.
sp@sp-desktop:~$ sudo apt-get -upgrade
E: Command line option 'p' [from -upgrade] is not known.
sp@sp-desktop:~$

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#3

Hi,

First please make sure to close all open programs, including all package managers like Synaptic, Add/remove programs, etc ...

Then please try this procedure:

Step 1: Open Terminal from "Applications->Accessories->
Terminal"

Step 2: Please COPY-PASTE each line below into the Terminal then hit <enter> after each line)

Tip: If you have a wheel mouse or 3 button mouse, you do not need to type commands into the Terminal. Highlight the command written on the webpage. Move your cursor anywhere in the Terminal and press the wheel or middle button. Automatic Copy and paste! No spelling mistakes! No Typos! No other errors!

cat /etc/lsb-release
uname -a
sudo rm /var/lib/apt/lists/lock
sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo rm -rf /var/lib/dpkg/updates/*
sudo rm -rf /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo aptitude clean
LANG=C;sudo aptitude autoclean
LANG=C;sudo apt-get update
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo aptitude install -f
LANG=C;sudo aptitude update
LANG=C;sudo aptitude dist-upgrade

Step 3: Please post results (copy/paste terminal output from each command) on this thread

Hope it helps,

Regards,

Mark

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) said :
#4

Copy and paste commands for the terminal are <Control>+<Shift>+C and <Control>+<Shift>+V. This may be of help.

Revision history for this message
jhfhlkjlj (fdsuufijjejejejej-deactivatedaccount) said :
#5

Copy and paste commands for the Terminal are <Control>+<Shift>+C and <Control>+<Shift>+V.

Revision history for this message
Indian Art (goldfish-aol) said :
#6

Thank you Mark Rijckenberg and Chauncellor for your help. I learnt a new trick with the wheel mouse tip, its very useful.

I followed your instructions carefully. Here are the results of the terminal output from each command:

sp@sp-desktop:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"
sp@sp-desktop:~$ uname -a
Linux sp-desktop 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux
sp@sp-desktop:~$ sudo rm /var/lib/apt/lists/lock
[sudo] password for sp:
sp@sp-desktop:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sp@sp-desktop:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sp@sp-desktop:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sp@sp-desktop:~$ sudo rm -rf /var/lib/dpkg/updates/*
sp@sp-desktop:~$ sudo rm -rf /var/lib/apt/lists
sp@sp-desktop:~$ sudo mkdir /var/lib/apt/lists
sp@sp-desktop:~$ sudo mkdir /var/lib/apt/lists/partial
sp@sp-desktop:~$ LANG=C;sudo aptitude clean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
sp@sp-desktop:~$ LANG=C;sudo aptitude autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Freed 0B of disk space
sp@sp-desktop:~$ LANG=C;sudo apt-get update
Get:1 http://dl.google.com stable Release.gpg [189B]
Get:2 http://ftp.usf.edu lucid Release.gpg [189B]
Get:3 http://ftp.usf.edu lucid-updates Release.gpg [189B]
Get:4 http://dl.google.com stable Release [2544B]
Get:5 http://ppa.launchpad.net lucid Release.gpg [307B]
Get:6 http://ftp.usf.edu lucid-security Release.gpg [189B]
Get:7 http://ftp.usf.edu lucid Release [57.2kB]
Get:8 http://dl.google.com stable/main Packages [1061B]
Get:9 http://ppa.launchpad.net lucid Release [57.3kB]
Get:10 http://ftp.usf.edu lucid-updates Release [38.5kB]
Get:11 http://ppa.launchpad.net lucid/main Packages [617B]
Get:12 http://ftp.usf.edu lucid-security Release [38.5kB]
Get:13 http://ftp.usf.edu lucid/main Packages [1386kB]
Get:14 http://ftp.usf.edu lucid/main Sources [659kB]
Get:15 http://ftp.usf.edu lucid/universe Packages [5448kB]
Get:16 http://ftp.usf.edu lucid/universe Sources [3165kB]
Get:17 http://ftp.usf.edu lucid-updates/main Packages [196kB]
Get:18 http://ftp.usf.edu lucid-updates/main Sources [76.0kB]
Get:19 http://ftp.usf.edu lucid-updates/universe Packages [47.2kB]
Get:20 http://ftp.usf.edu lucid-updates/universe Sources [13.1kB]
Get:21 http://ftp.usf.edu lucid-security/main Packages [34.6kB]
Get:22 http://ftp.usf.edu lucid-security/main Sources [11.2kB]
Get:23 http://ftp.usf.edu lucid-security/universe Packages [13.2kB]
Get:24 http://ftp.usf.edu lucid-security/universe Sources [2013B]
Fetched 11.2MB in 7min 12s (26.0kB/s)
Reading package lists... Done
sp@sp-desktop:~$ sudo dpkg --clear-avail
sp@sp-desktop:~$ sudo dpkg --configure -a
Setting up python-ubuntuone-client (1.2.1-0ubuntu3) ...

Setting up update-manager-core (1:0.134.9) ...

Setting up pm-utils-powersave-policy (0.3.1) ...
Setting up openssh-client (1:5.3p1-3ubuntu4) ...

Setting up ssh-askpass-gnome (1:5.3p1-3ubuntu4) ...

Processing triggers for python-central ...
Setting up update-manager (1:0.134.9) ...

Setting up ubuntuone-client (1.2.1-0ubuntu3) ...
Setting up ubuntuone-client-gnome (1.2.1-0ubuntu3) ...
Setting up update-manager-kde (1:0.134.9) ...

Processing triggers for python-central ...
sp@sp-desktop:~$ LANG=C;sudo aptitude install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages will be REMOVED:
  alien{u} bsd-mailx{u} build-essential{u} debhelper{u} dpkg-dev{u}
  fakeroot{u} html2text{u} intltool-debian{u} libcompress-zlib-perl{u}
  libmail-sendmail-perl{u} libnspr4-dev{u} libnss3-dev{u} libqt3-mt{u}
  librpm0{u} librpmbuild0{u} librpmio0{u} libsys-hostname-long-perl{u}
  lsb-core{u} lsb-cxx{u} lsb-desktop{u} lsb-graphics{u} ncurses-term{u}
  pax{u} po-debconf{u} postfix{u} rpm{u} rpm-common{u} rpm2cpio{u}
  xz-utils{u}
0 packages upgraded, 0 newly installed, 29 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 33.5MB will be freed.
Do you want to continue? [Y/n/?] Y
(Reading database ... 207531 files and directories currently installed.)
Removing lsb-desktop ...
Removing lsb-graphics ...
Removing lsb-cxx ...
Removing lsb-core ...
Removing alien ...
Removing bsd-mailx ...
Removing build-essential ...
Removing debhelper ...
Removing dpkg-dev ...
Removing fakeroot ...
update-alternatives: using /usr/bin/fakeroot-tcp to provide /usr/bin/fakeroot (fakeroot) in auto mode.
Removing html2text ...
Removing po-debconf ...
Removing intltool-debian ...
Removing libcompress-zlib-perl ...
Removing libmail-sendmail-perl ...
Removing libnss3-dev ...
Removing libnspr4-dev ...
Removing libqt3-mt ...
Removing rpm ...
Removing rpm2cpio ...
Removing librpmbuild0 ...
Removing librpm0 ...
Removing librpmio0 ...
Removing libsys-hostname-long-perl ...
Removing ncurses-term ...
Removing pax ...
Removing postfix ...
 * Stopping Postfix Mail Transport Agent postfix [ OK ]
Removing rpm-common ...
Removing xz-utils ...
Processing triggers for man-db ...
Processing triggers for doc-base ...
Processing 2 removed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for ufw ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done

sp@sp-desktop:~$ LANG=C;sudo aptitude update
Get:1 http://dl.google.com stable Release.gpg [189B]
Get:2 http://dl.google.com stable Release [2544B]
Get:3 http://dl.google.com stable/main Packages [1061B]
Hit http://ppa.launchpad.net lucid Release.gpg
Hit http://ftp.usf.edu lucid Release.gpg
Hit http://ftp.usf.edu lucid-updates Release.gpg
Hit http://ppa.launchpad.net lucid Release
Hit http://ftp.usf.edu lucid-security Release.gpg
Hit http://ftp.usf.edu lucid Release
Hit http://ppa.launchpad.net lucid/main Packages
Hit http://ftp.usf.edu lucid-updates Release
Hit http://ftp.usf.edu lucid-security Release
Hit http://ftp.usf.edu lucid/main Packages
Hit http://ftp.usf.edu lucid/main Sources
Hit http://ftp.usf.edu lucid/universe Packages
Hit http://ftp.usf.edu lucid/universe Sources
Hit http://ftp.usf.edu lucid-updates/main Packages
Hit http://ftp.usf.edu lucid-updates/main Sources
Hit http://ftp.usf.edu lucid-updates/universe Packages
Hit http://ftp.usf.edu lucid-updates/universe Sources
Hit http://ftp.usf.edu lucid-security/main Packages
Hit http://ftp.usf.edu lucid-security/main Sources
Hit http://ftp.usf.edu lucid-security/universe Packages
Hit http://ftp.usf.edu lucid-security/universe Sources
Fetched 3794B in 2s (1370B/s)
Reading package lists... Done

sp@sp-desktop:~$ LANG=C;sudo aptitude dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B of archives. After unpacking 0B will be used.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done

sp@sp-desktop:~$

Revision history for this message
Mark Rijckenberg (markrijckenberg) said :
#7

According to the output you sent, the package manager issue should be solved now. If the issue is still solved, can you please set this thread status to "solved"? Thanks, Mark

Revision history for this message
Indian Art (goldfish-aol) said :
#8

Hi Mark Rijckenberg,

I have checked the package manager 'Update Manager', the 'Synaptic Package Manager' and the 'Ubuntu Software Center'. They are all working fine, just like before the power outages. So, I am marking this as solved.

Thank you very much.

Revision history for this message
Donald Gariepy (dgariepy-o) said :
#9

Thank you mark. Your script did fix my problem.

 I am not familiar enough with this software to make a record copy of about 20 minutes worth of terminal activity. It did activate the update manager and re run some updates. Alarms are clear and the update manager activates normally and correctly shows no update waiting.

I had a power failure preceeded by a loss of communications (the typhoon carried away my phone line that carries my DSL connection, also knocked over an electric transmission line. I am not completely sure which came first as I was busy with roof repair when the lights went out.

thnx Don