Cant Fix broken packages

Asked by Patrick Wilson

Im following the guidance in /PackageManagerTroubleshootingProcedure - here is the output as requested:

patrick@Elphin10:~$ sudo fuser -vvv /var/lib/dpkg/lock
sudo: unable to resolve host Elphin10
[sudo] password for patrick:
Sorry, try again.
[sudo] password for patrick:
patrick@Elphin10:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu 11.10"
patrick@Elphin10:~$
patrick@Elphin10:~$ uname -a
Linux Elphin10 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo rm /var/lib/apt/lists/lock
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
sudo: unable to resolve host Elphin10

patrick@Elphin10:~$
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo rm -rf /var/lib/dpkg/updates/*
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo rm -rf /var/lib/apt/lists
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo rm /var/cache/apt/*.bin
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo mkdir /var/lib/apt/lists
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo mkdir /var/lib/apt/lists/partial
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get clean
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get autoclean
sudo: unable to resolve host Elphin10
Reading package lists... Done
Building dependency tree
Reading state information... Done
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get --purge autoremove
sudo: unable to resolve host Elphin10
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mawk (1.3.3-15ubuntu2.11.10) ...
Setting up libdpkg-perl (1.16.0.3ubuntu5.1) ...
Setting up dpkg-dev (1.16.0.3ubuntu5.1) ...
Setting up ubuntu-tweak (0.7.0-1~oneiric4) ...
Setting up update-manager-core (1:0.152.25.9) ...
Setting up update-manager (1:0.152.25.9) ...
patrick@Elphin10:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo: unable to resolve host Elphin10
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick InRelease
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty InRelease
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick Release.gpg
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty Release.gpg
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick Release
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty Release
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main TranslationIndex
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted TranslationIndex
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main TranslationIndex
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted TranslationIndex
Err cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main Translation-en
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted Translation-en
Ign http://gb.archive.ubuntu.com oneiric InRelease
Ign http://gb.archive.ubuntu.com oneiric-updates InRelease
Ign http://security.ubuntu.com oneiric-security InRelease
Ign http://archive.canonical.com oneiric InRelease
Get:1 http://gb.archive.ubuntu.com oneiric Release.gpg [198 B]
Get:2 http://security.ubuntu.com oneiric-security Release.gpg [198 B]
Get:3 http://archive.canonical.com oneiric Release.gpg [198 B]
Get:4 http://gb.archive.ubuntu.com oneiric-updates Release.gpg [198 B]
Get:5 http://security.ubuntu.com oneiric-security Release [40.8 kB]
Get:6 http://archive.canonical.com oneiric Release [5922 B]
Get:7 http://gb.archive.ubuntu.com oneiric Release [40.8 kB]
Get:8 http://archive.canonical.com oneiric/partner Sources [2617 B]
Get:9 http://archive.canonical.com oneiric/partner i386 Packages [4333 B]
Ign http://archive.canonical.com oneiric/partner TranslationIndex
Get:10 http://security.ubuntu.com oneiric-security/main Sources [36.5 kB]
Get:11 http://gb.archive.ubuntu.com oneiric-updates Release [40.8 kB]
Get:12 http://security.ubuntu.com oneiric-security/restricted Sources [1959 B]
Get:13 http://security.ubuntu.com oneiric-security/universe Sources [14.2 kB]
Get:14 http://security.ubuntu.com oneiric-security/multiverse Sources [1646 B]
Get:15 http://security.ubuntu.com oneiric-security/main i386 Packages [97.7 kB]
Ign http://archive.canonical.com oneiric/partner Translation-en
Get:16 http://gb.archive.ubuntu.com oneiric/main Sources [877 kB]
Get:17 http://security.ubuntu.com oneiric-security/restricted i386 Packages [3939 B]
Get:18 http://security.ubuntu.com oneiric-security/universe i386 Packages [32.7 kB]
Get:19 http://security.ubuntu.com oneiric-security/multiverse i386 Packages [3372 B]
Get:20 http://security.ubuntu.com oneiric-security/main TranslationIndex [73 B]
Get:21 http://security.ubuntu.com oneiric-security/multiverse TranslationIndex [72 B]
Get:22 http://security.ubuntu.com oneiric-security/restricted TranslationIndex [71 B]
Get:23 http://security.ubuntu.com oneiric-security/universe TranslationIndex [73 B]
Get:24 http://security.ubuntu.com oneiric-security/main Translation-en [54.3 kB]
Get:25 http://security.ubuntu.com oneiric-security/multiverse Translation-en [1494 B]
Get:26 http://security.ubuntu.com oneiric-security/restricted Translation-en [978 B]
Get:27 http://security.ubuntu.com oneiric-security/universe Translation-en [23.1 kB]
Get:28 http://gb.archive.ubuntu.com oneiric/restricted Sources [5351 B]
Get:29 http://gb.archive.ubuntu.com oneiric/universe Sources [4677 kB]
Get:30 http://gb.archive.ubuntu.com oneiric/multiverse Sources [149 kB]
Get:31 http://gb.archive.ubuntu.com oneiric/main i386 Packages [1226 kB]
Get:32 http://gb.archive.ubuntu.com oneiric/restricted i386 Packages [8216 B]
Get:33 http://gb.archive.ubuntu.com oneiric/universe i386 Packages [4468 kB]
Get:34 http://gb.archive.ubuntu.com oneiric/multiverse i386 Packages [119 kB]
Get:35 http://gb.archive.ubuntu.com oneiric/main TranslationIndex [3289 B]
Get:36 http://gb.archive.ubuntu.com oneiric/multiverse TranslationIndex [2265 B]
Get:37 http://gb.archive.ubuntu.com oneiric/restricted TranslationIndex [2263 B]
Get:38 http://gb.archive.ubuntu.com oneiric/universe TranslationIndex [2640 B]
Get:39 http://gb.archive.ubuntu.com oneiric-updates/main Sources [137 kB]
Get:40 http://gb.archive.ubuntu.com oneiric-updates/restricted Sources [2864 B]
Get:41 http://gb.archive.ubuntu.com oneiric-updates/universe Sources [50.4 kB]
Get:42 http://gb.archive.ubuntu.com oneiric-updates/multiverse Sources [3652 B]
Get:43 http://gb.archive.ubuntu.com oneiric-updates/main i386 Packages [322 kB]
Get:44 http://gb.archive.ubuntu.com oneiric-updates/restricted i386 Packages [6268 B]
Get:45 http://gb.archive.ubuntu.com oneiric-updates/universe i386 Packages [109 kB]
Get:46 http://gb.archive.ubuntu.com oneiric-updates/multiverse i386 Packages [6358 B]
Get:47 http://gb.archive.ubuntu.com oneiric-updates/main TranslationIndex [74 B]
Get:48 http://gb.archive.ubuntu.com oneiric-updates/multiverse TranslationIndex [72 B]
Get:49 http://gb.archive.ubuntu.com oneiric-updates/restricted TranslationIndex [72 B]
Get:50 http://gb.archive.ubuntu.com oneiric-updates/universe TranslationIndex [73 B]
Get:51 http://gb.archive.ubuntu.com oneiric/main Translation-en [701 kB]
Get:52 http://gb.archive.ubuntu.com oneiric/multiverse Translation-en [92.6 kB]
Get:53 http://gb.archive.ubuntu.com oneiric/restricted Translation-en [2229 B]
Get:54 http://gb.archive.ubuntu.com oneiric/universe Translation-en [3165 kB]
Get:55 http://gb.archive.ubuntu.com oneiric-updates/main Translation-en [151 kB]
Get:56 http://gb.archive.ubuntu.com oneiric-updates/multiverse Translation-en [3524 B]
Get:57 http://gb.archive.ubuntu.com oneiric-updates/restricted Translation-en [1304 B]
Get:58 http://gb.archive.ubuntu.com oneiric-updates/universe Translation-en [65.7 kB]
Fetched 16.8 MB in 19s (879 kB/s)
W: Failed to fetch cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)/dists/maverick/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)/dists/maverick/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/dists/natty/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/dists/natty/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

E: Some index files failed to download. They have been ignored, or old ones used instead.
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo dpkg --configure -a
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ sudo dpkg --clear-avail
sudo: unable to resolve host Elphin10
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get -f install
sudo: unable to resolve host Elphin10
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get --fix-missing install
sudo: unable to resolve host Elphin10
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
patrick@Elphin10:~$
patrick@Elphin10:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
sudo: unable to resolve host Elphin10
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick InRelease
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty InRelease
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick Release.gpg
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty Release.gpg
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick Release
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty Release
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main TranslationIndex
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted TranslationIndex
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main TranslationIndex
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted TranslationIndex
Err cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Err cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted i386 Packages
  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/main Translation-en
Ign cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007) maverick/restricted Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/main Translation-en
Ign cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1) natty/restricted Translation-en
Ign http://gb.archive.ubuntu.com oneiric InRelease
Ign http://gb.archive.ubuntu.com oneiric-updates InRelease
Ign http://archive.canonical.com oneiric InRelease
Ign http://security.ubuntu.com oneiric-security InRelease
Hit http://gb.archive.ubuntu.com oneiric Release.gpg
Hit http://archive.canonical.com oneiric Release.gpg
Hit http://security.ubuntu.com oneiric-security Release.gpg
Hit http://gb.archive.ubuntu.com oneiric-updates Release.gpg
Hit http://archive.canonical.com oneiric Release
Hit http://security.ubuntu.com oneiric-security Release
Hit http://gb.archive.ubuntu.com oneiric Release
Hit http://archive.canonical.com oneiric/partner Sources
Hit http://gb.archive.ubuntu.com oneiric-updates Release
Hit http://security.ubuntu.com oneiric-security/main Sources
Hit http://archive.canonical.com oneiric/partner i386 Packages
Ign http://archive.canonical.com oneiric/partner TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric/main Sources
Hit http://gb.archive.ubuntu.com oneiric/restricted Sources
Hit http://gb.archive.ubuntu.com oneiric/universe Sources
Hit http://gb.archive.ubuntu.com oneiric/multiverse Sources
Hit http://gb.archive.ubuntu.com oneiric/main i386 Packages
Hit http://gb.archive.ubuntu.com oneiric/restricted i386 Packages
Hit http://gb.archive.ubuntu.com oneiric/universe i386 Packages
Hit http://gb.archive.ubuntu.com oneiric/multiverse i386 Packages
Hit http://gb.archive.ubuntu.com oneiric/main TranslationIndex
Hit http://security.ubuntu.com oneiric-security/restricted Sources
Hit http://security.ubuntu.com oneiric-security/universe Sources
Hit http://security.ubuntu.com oneiric-security/multiverse Sources
Hit http://security.ubuntu.com oneiric-security/main i386 Packages
Hit http://security.ubuntu.com oneiric-security/restricted i386 Packages
Hit http://gb.archive.ubuntu.com oneiric/multiverse TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric/restricted TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric/universe TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/main Sources
Hit http://gb.archive.ubuntu.com oneiric-updates/restricted Sources
Hit http://gb.archive.ubuntu.com oneiric-updates/universe Sources
Hit http://security.ubuntu.com oneiric-security/universe i386 Packages
Hit http://security.ubuntu.com oneiric-security/multiverse i386 Packages
Hit http://security.ubuntu.com oneiric-security/main TranslationIndex
Hit http://security.ubuntu.com oneiric-security/multiverse TranslationIndex
Hit http://security.ubuntu.com oneiric-security/restricted TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/multiverse Sources
Hit http://gb.archive.ubuntu.com oneiric-updates/main i386 Packages
Hit http://gb.archive.ubuntu.com oneiric-updates/restricted i386 Packages
Hit http://gb.archive.ubuntu.com oneiric-updates/universe i386 Packages
Hit http://gb.archive.ubuntu.com oneiric-updates/multiverse i386 Packages
Hit http://security.ubuntu.com oneiric-security/universe TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/main TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/multiverse TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/restricted TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric-updates/universe TranslationIndex
Hit http://gb.archive.ubuntu.com oneiric/main Translation-en
Hit http://security.ubuntu.com oneiric-security/main Translation-en
Hit http://security.ubuntu.com oneiric-security/multiverse Translation-en
Hit http://gb.archive.ubuntu.com oneiric/multiverse Translation-en
Hit http://gb.archive.ubuntu.com oneiric/restricted Translation-en
Hit http://gb.archive.ubuntu.com oneiric/universe Translation-en
Ign http://archive.canonical.com oneiric/partner Translation-en
Hit http://security.ubuntu.com oneiric-security/restricted Translation-en
Hit http://gb.archive.ubuntu.com oneiric-updates/main Translation-en
Hit http://gb.archive.ubuntu.com oneiric-updates/multiverse Translation-en
Hit http://gb.archive.ubuntu.com oneiric-updates/restricted Translation-en
Hit http://gb.archive.ubuntu.com oneiric-updates/universe Translation-en
Hit http://security.ubuntu.com oneiric-security/universe Translation-en
W: Failed to fetch cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)/dists/maverick/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 10.10 _Maverick Meerkat_ - Release i386 (20101007)/dists/maverick/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/dists/natty/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)/dists/natty/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs

E: Some index files failed to download. They have been ignored, or old ones used instead.
patrick@Elphin10:~$ ^C
patrick@Elphin10:~$

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you run:

gksudo gedit /etc/apt/sources.list

And comment out the top few lines which reference the CD. Close gedit then run:

sudo apt-get update

Should be ok

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

You are running oneiric, not maverick. So please remove all lines mentioning maverick in /etc/apt/sources.list and in /etc/apt/sources.list.d/

Can you help with this problem?

Provide an answer of your own, or ask Patrick Wilson for more information if necessary.

To post a message you must log in.