update manager leaves lock file

Asked by Mark Wattier

I followed the directions to run some diagnostic commands. I was not able to complete the procedure because it asked me to insert the installation CD which I no longer have. Here are the commands and the output as requested on Launchpad. I don't yet know whether the updater or package manager is now in an operable condition.

mark@markwlinux0:~$ sudo fuser -vvv /var/lib/dpkg/lock
mark@markwlinux0:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
mark@markwlinux0:~$ uname -a
Linux markwlinux0 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58 UTC 2011 i686 GNU/Linux
mark@markwlinux0:~$ sudo rm /var/lib/apt/lists/lock
rm: cannot remove `/var/lib/apt/lists/lock': No such file or directory
mark@markwlinux0:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
mark@markwlinux0:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
mark@markwlinux0:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
mark@markwlinux0:~$ sudo rm -rf /var/lib/dpkg/updates/*
mark@markwlinux0:~$ sudo rm -rf /var/lib/apt/lists
mark@markwlinux0:~$ sudo rm /var/cache/apt/*.bin
mark@markwlinux0:~$ sudo mkdir /var/lib/apt/lists
mark@markwlinux0:~$ sudo mkdir /var/lib/apt/lists/partial
mark@markwlinux0:~$ LANG=C;sudo apt-get clean
mark@markwlinux0:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
mark@markwlinux0:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  libgcj-common* libruby1.8* python-bugbuddy* python-evince* python-evolution*
  python-gnomedesktop* python-gtop* python-mediaprofiles* python-metacity*
  python-totem-plparser* ruby1.8*
0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
24 not fully installed or removed.
After this operation, 8860kB disk space will be freed.
Do you want to continue [Y/n]? Y
warning, in file '/var/lib/dpkg/status' near line 47061 package 'virtualbox-3.1':
 error in Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
warning, in file '/var/lib/dpkg/status' near line 47062 package 'virtualbox-3.1':
 error in Config-Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
warning, in file '/var/lib/dpkg/available' near line 50077 package 'virtualbox-3.1':
 error in Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
(Reading database ... 305958 files and directories currently installed.)
Removing libgcj-common ...
Purging configuration files for libgcj-common ...
Removing ruby1.8 ...
Purging configuration files for ruby1.8 ...
Removing libruby1.8 ...
Purging configuration files for libruby1.8 ...
Removing python-bugbuddy ...
Removing python-evince ...
Removing python-evolution ...
Removing python-gnomedesktop ...
Removing python-gtop ...
Removing python-mediaprofiles ...
Removing python-metacity ...
Removing python-totem-plparser ...
Processing triggers for man-db ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Processing triggers for python-support ...
warning, in file '/var/lib/dpkg/status' near line 46869 package 'virtualbox-3.1':
 error in Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
warning, in file '/var/lib/dpkg/status' near line 46870 package 'virtualbox-3.1':
 error in Config-Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
warning, in file '/var/lib/dpkg/available' near line 50077 package 'virtualbox-3.1':
 error in Version string '3.1.2-56127_Ubuntu_intrepid': invalid character in revision number
Setting up libldap-2.4-2 (2.4.23-0ubuntu3.5) ...
Setting up gdm (2.30.5-0ubuntu4.1) ...
Setting up libqtcore4 (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-xml (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-dbus (4:4.7.0-0ubuntu4.3) ...
Setting up libqtgui4 (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-script (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-designer (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-network (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-sql (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-help (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-opengl (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-qt3support (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-scripttools (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-sql-mysql (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-sql-sqlite (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-svg (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-test (4:4.7.0-0ubuntu4.3) ...
Setting up libqt4-xmlpatterns (4:4.7.0-0ubuntu4.3) ...
Setting up libwbclient0 (2:3.5.4~dfsg-1ubuntu8.4) ...
Setting up libsmbclient (2:3.5.4~dfsg-1ubuntu8.4) ...
Setting up samba-common (2:3.5.4~dfsg-1ubuntu8.4) ...
Setting up samba-common-bin (2:3.5.4~dfsg-1ubuntu8.4) ...
Setting up smbclient (2:3.5.4~dfsg-1ubuntu8.4) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
mark@markwlinux0:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
Ign cdrom://Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429) lucid Release.gpg
Get:1 http://extras.ubuntu.com maverick Release.gpg [72B]
Ign http://extras.ubuntu.com/ubuntu/ maverick/main Translation-en
Get:2 http://archive.ubuntu.com maverick Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick/universe Translation-en
Get:3 http://archive.ubuntu.com maverick-updates Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/multiverse Translation-en
Get:4 http://extras.ubuntu.com maverick Release [9762B]
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-updates/universe Translation-en
Get:5 http://archive.ubuntu.com maverick-security Release.gpg [198B]
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/main Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/multiverse Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/restricted Translation-en
Ign http://archive.ubuntu.com/ubuntu/ maverick-security/universe Translation-en
Get:6 http://archive.ubuntu.com maverick Release [39.8kB]
Get:7 http://extras.ubuntu.com maverick/main i386 Packages [1216B]
Get:8 http://archive.ubuntu.com maverick-updates Release [31.4kB]
Get:9 http://archive.ubuntu.com maverick-security Release [31.4kB]
Get:10 http://archive.ubuntu.com maverick/main Sources [829kB]
Get:11 http://archive.ubuntu.com maverick/restricted Sources [4370B]
Get:12 http://archive.ubuntu.com maverick/universe Sources [4179kB]
Get:13 http://archive.ubuntu.com maverick/multiverse Sources [151kB]
Get:14 http://archive.ubuntu.com maverick/main i386 Packages [1492kB]
Get:15 http://archive.ubuntu.com maverick/restricted i386 Packages [5992B]
Get:16 http://archive.ubuntu.com maverick/universe i386 Packages [5791kB]
Get:17 http://archive.ubuntu.com maverick/multiverse i386 Packages [183kB]
Get:18 http://archive.ubuntu.com maverick-updates/main Sources [95.8kB]
Get:19 http://archive.ubuntu.com maverick-updates/restricted Sources [778B]
Get:20 http://archive.ubuntu.com maverick-updates/universe Sources [39.0kB]
Get:21 http://archive.ubuntu.com maverick-updates/multiverse Sources [1496B]
Get:22 http://archive.ubuntu.com maverick-updates/main i386 Packages [266kB]
Get:23 http://archive.ubuntu.com maverick-updates/restricted i386 Packages [1797B]
Get:24 http://archive.ubuntu.com maverick-updates/universe i386 Packages [113kB]
Get:25 http://archive.ubuntu.com maverick-updates/multiverse i386 Packages [2844B]
Get:26 http://archive.ubuntu.com maverick-security/main Sources [35.6kB]
Get:27 http://archive.ubuntu.com maverick-security/restricted Sources [14B]
Get:28 http://archive.ubuntu.com maverick-security/universe Sources [13.4kB]
Get:29 http://archive.ubuntu.com maverick-security/multiverse Sources [649B]
Get:30 http://archive.ubuntu.com maverick-security/main i386 Packages [122kB]
Get:31 http://archive.ubuntu.com maverick-security/restricted i386 Packages [14B]
Get:32 http://archive.ubuntu.com maverick-security/universe i386 Packages [54.9kB]
Get:33 http://archive.ubuntu.com maverick-security/multiverse i386 Packages [1660B]
Media change: please insert the disc labeled
 'Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)'
in the drive '/cdrom/' and press enter

99% [Working]
99% [Working]
Media change: please insert the disc labeled
 'Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)'
in the drive '/cdrom/' and press enter
99% [Working]^C
mark@markwlinux0:~$

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
David Jones (dj) said :
#1

mukul@usrvr:~$ sudo apt-get install ubuntu-desktop
mukul@usrvr:~$ sudo apt-get remove ubuntu-desktop
mukul@usrvr:~$ sudo dpkg --configure -a

Revision history for this message
David Jones (dj) said :
#2

mukul@usrvr<<<<< delete this part

Revision history for this message
Mark Wattier (mark-wattier) said :
#3

I had already removed the lock file in order to set the server to Main as in the instructions here:
PackageManagerTroubleshootingProcedure

This lock file seems to get left behind by the updater occasionally, regardless of whether I have used apt-get or synaptic since the last update. The lock file is present when none of these are running.

Revision history for this message
Mark Wattier (mark-wattier) said :
#4

I understand that I should not type the prompt. Are you sure I should install ubuntu-desktop first, then remove it? That seems backwards.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

For the issue with the CD:
go to "system - administration - software sources", switch to the second tab and deselect the entry 'CD lucid lynx'

Then try the following commands again in a terminal:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Can you help with this problem?

Provide an answer of your own, or ask Mark Wattier for more information if necessary.

To post a message you must log in.