Fix broken packages in ubuntu

Asked by Gaurav Krishna

krishna@krishna-Studio-1558:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for krishna:
krishna@krishna-Studio-1558:~$ sudo fuser -vvv /var/lib/dpkg/lock
[sudo] password for krishna:
krishna@krishna-Studio-1558:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.04
DISTRIB_CODENAME=natty
DISTRIB_DESCRIPTION="Ubuntu 11.04"
krishna@krishna-Studio-1558:~$ uname -a
Linux krishna-Studio-1558 2.6.38-13-generic #57-Ubuntu SMP Mon Mar 5 18:10:14 UTC 2012 i686 i686 i386 GNU/Linux
krishna@krishna-Studio-1558:~$ sudo rm /var/lib/apt/lists/lock
krishna@krishna-Studio-1558:~$ sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup
krishna@krishna-Studio-1558:~$ sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
krishna@krishna-Studio-1558:~$ sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
krishna@krishna-Studio-1558:~$ sudo mv /var/lib/dpkg/available /var/lib/dpkg/available-bad
krishna@krishna-Studio-1558:~$ sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available
krishna@krishna-Studio-1558:~$ sudo rm -rf /var/lib/dpkg/updates/*
krishna@krishna-Studio-1558:~$ sudo rm -rf /var/lib/apt/lists
krishna@krishna-Studio-1558:~$ sudo rm /var/cache/apt/*.bin
krishna@krishna-Studio-1558:~$ sudo mkdir /var/lib/apt/lists
krishna@krishna-Studio-1558:~$ sudo mkdir /var/lib/apt/lists/partial
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get clean
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get autoclean
Reading package lists... Done
Building dependency tree
Reading state information... Done
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
Ign http://archive.canonical.com natty InRelease
Get:1 http://archive.canonical.com natty Release.gpg [198 B]
Ign http://archive.ubuntu.com natty InRelease
Ign http://archive.ubuntu.com natty-updates InRelease
Ign http://archive.ubuntu.com natty-security InRelease
Get:2 http://archive.canonical.com natty Release [5916 B]
Get:3 http://archive.ubuntu.com natty Release.gpg [198 B]
Get:4 http://archive.ubuntu.com natty-updates Release.gpg [198 B]
Get:5 http://archive.ubuntu.com natty-security Release.gpg [198 B]
Get:6 http://archive.canonical.com natty/partner i386 Packages [7285 B]
Get:7 http://archive.ubuntu.com natty Release [39.8 kB]
Ign http://archive.canonical.com natty/partner TranslationIndex
Get:8 http://archive.ubuntu.com natty-updates Release [39.8 kB]
Get:9 http://archive.ubuntu.com natty-security Release [39.8 kB]
Get:10 http://archive.ubuntu.com natty/main Sources [862 kB]
Get:11 http://archive.ubuntu.com natty/restricted Sources [4104 B]
Get:12 http://archive.ubuntu.com natty/universe Sources [4380 kB]
Ign http://archive.canonical.com natty/partner Translation-en_IN
Ign http://archive.canonical.com natty/partner Translation-en
Get:13 http://archive.ubuntu.com natty/multiverse Sources [155 kB]
Get:14 http://archive.ubuntu.com natty/main i386 Packages [1550 kB]
Get:15 http://archive.ubuntu.com natty/restricted i386 Packages [8986 B]
Get:16 http://archive.ubuntu.com natty/universe i386 Packages [6021 kB]
Get:17 http://archive.ubuntu.com natty/multiverse i386 Packages [183 kB]
Ign http://archive.ubuntu.com natty/main TranslationIndex
Ign http://archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty/restricted TranslationIndex
Ign http://archive.ubuntu.com natty/universe TranslationIndex
Get:18 http://archive.ubuntu.com natty-updates/main Sources [157 kB]
Get:19 http://archive.ubuntu.com natty-updates/restricted Sources [1749 B]
Get:20 http://archive.ubuntu.com natty-updates/universe Sources [42.6 kB]
Get:21 http://archive.ubuntu.com natty-updates/multiverse Sources [3116 B]
Get:22 http://archive.ubuntu.com natty-updates/main i386 Packages [442 kB]
Get:23 http://archive.ubuntu.com natty-updates/restricted i386 Packages [5235 B]
Get:24 http://archive.ubuntu.com natty-updates/universe i386 Packages [141 kB]
Get:25 http://archive.ubuntu.com natty-updates/multiverse i386 Packages [6364 B]
Ign http://archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-updates/universe TranslationIndex
Get:26 http://archive.ubuntu.com natty-security/main Sources [94.0 kB]
Get:27 http://archive.ubuntu.com natty-security/restricted Sources [1292 B]
Get:28 http://archive.ubuntu.com natty-security/universe Sources [22.6 kB]
Get:29 http://archive.ubuntu.com natty-security/multiverse Sources [1640 B]
Get:30 http://archive.ubuntu.com natty-security/main i386 Packages [285 kB]
Get:31 http://archive.ubuntu.com natty-security/restricted i386 Packages [4787 B]
Get:32 http://archive.ubuntu.com natty-security/universe i386 Packages [78.5 kB]
Get:33 http://archive.ubuntu.com natty-security/multiverse i386 Packages [3540 B]
Ign http://archive.ubuntu.com natty-security/main TranslationIndex
Ign http://archive.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-security/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-security/universe TranslationIndex
Ign http://archive.ubuntu.com natty/main Translation-en_IN
Ign http://archive.ubuntu.com natty/main Translation-en
Ign http://archive.ubuntu.com natty/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty/multiverse Translation-en
Ign http://archive.ubuntu.com natty/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty/restricted Translation-en
Ign http://archive.ubuntu.com natty/universe Translation-en_IN
Ign http://archive.ubuntu.com natty/universe Translation-en
Ign http://archive.ubuntu.com natty-updates/main Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/main Translation-en
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://archive.ubuntu.com natty-updates/universe Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/universe Translation-en
Ign http://archive.ubuntu.com natty-security/main Translation-en_IN
Ign http://archive.ubuntu.com natty-security/main Translation-en
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en
Ign http://archive.ubuntu.com natty-security/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty-security/restricted Translation-en
Ign http://archive.ubuntu.com natty-security/universe Translation-en_IN
Ign http://archive.ubuntu.com natty-security/universe Translation-en
Fetched 14.6 MB in 29s (497 kB/s)
Reading package lists... Done
krishna@krishna-Studio-1558:~$ sudo dpkg --configure -a
krishna@krishna-Studio-1558:~$ sudo dpkg --clear-avail
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get --fix-missing install
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
krishna@krishna-Studio-1558:~$ LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade
Ign http://archive.ubuntu.com natty InRelease
Ign http://archive.ubuntu.com natty-updates InRelease
Ign http://archive.canonical.com natty InRelease
Hit http://archive.ubuntu.com natty-security InRelease
Ign http://archive.ubuntu.com natty-security InRelease
Hit http://archive.canonical.com natty Release.gpg
Hit http://archive.ubuntu.com natty Release.gpg
Hit http://archive.canonical.com natty Release
Ign http://archive.ubuntu.com natty-updates Release.gpg
Ign http://archive.ubuntu.com natty-security/main Sources/DiffIndex
Ign http://archive.ubuntu.com natty-security/restricted Sources/DiffIndex
Ign http://archive.ubuntu.com natty-security/universe Sources/DiffIndex
Ign http://archive.ubuntu.com natty-security/multiverse Sources/DiffIndex
Hit http://archive.canonical.com natty/partner i386 Packages
Ign http://archive.ubuntu.com natty-security/main i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-security/restricted i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-security/universe i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-security/multiverse i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-security/main TranslationIndex
Ign http://archive.canonical.com natty/partner TranslationIndex
Ign http://archive.ubuntu.com natty-security/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-security/restricted TranslationIndex
Hit http://archive.ubuntu.com natty-security/universe TranslationIndex
Hit http://archive.ubuntu.com natty Release
Hit http://archive.ubuntu.com natty-updates Release
Hit http://archive.ubuntu.com natty-security/main Sources
Hit http://archive.ubuntu.com natty-security/restricted Sources
Hit http://archive.ubuntu.com natty-security/universe Sources
Hit http://archive.ubuntu.com natty-security/multiverse Sources
Hit http://archive.ubuntu.com natty-security/main i386 Packages
Hit http://archive.ubuntu.com natty-security/restricted i386 Packages
Hit http://archive.ubuntu.com natty-security/universe i386 Packages
Hit http://archive.ubuntu.com natty-security/universe Translation-en
Hit http://archive.ubuntu.com natty/main Sources
Hit http://archive.ubuntu.com natty/restricted Sources
Hit http://archive.ubuntu.com natty/universe Sources
Hit http://archive.ubuntu.com natty/multiverse Sources
Hit http://archive.ubuntu.com natty/main i386 Packages
Hit http://archive.ubuntu.com natty/restricted i386 Packages
Hit http://archive.ubuntu.com natty/universe i386 Packages
Ign http://archive.ubuntu.com natty/main TranslationIndex
Ign http://archive.ubuntu.com natty/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty/restricted TranslationIndex
Ign http://archive.ubuntu.com natty/universe TranslationIndex
Ign http://archive.ubuntu.com natty-updates/main Sources/DiffIndex
Ign http://archive.ubuntu.com natty-updates/restricted Sources/DiffIndex
Ign http://archive.ubuntu.com natty-updates/universe Sources/DiffIndex
Ign http://archive.ubuntu.com natty-updates/multiverse Sources/DiffIndex
Ign http://archive.ubuntu.com natty-updates/main i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-updates/restricted i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-updates/universe i386 Packages/DiffIndex
Ign http://archive.canonical.com natty/partner Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/multiverse i386 Packages/DiffIndex
Ign http://archive.ubuntu.com natty-updates/main TranslationIndex
Ign http://archive.ubuntu.com natty-updates/multiverse TranslationIndex
Ign http://archive.ubuntu.com natty-updates/restricted TranslationIndex
Ign http://archive.ubuntu.com natty-updates/universe TranslationIndex
Ign http://archive.canonical.com natty/partner Translation-en
Hit http://archive.ubuntu.com natty-security/universe Translation-en_IN
Hit http://archive.ubuntu.com natty/universe Translation-en
Hit http://archive.ubuntu.com natty-updates/main Sources
Hit http://archive.ubuntu.com natty-updates/restricted Sources
Hit http://archive.ubuntu.com natty-updates/universe Sources
Hit http://archive.ubuntu.com natty-updates/multiverse Sources
Hit http://archive.ubuntu.com natty-updates/main i386 Packages
Hit http://archive.ubuntu.com natty-updates/restricted i386 Packages
Hit http://archive.ubuntu.com natty-updates/universe i386 Packages
Err http://archive.ubuntu.com natty/multiverse i386 Packages
  404 Not Found [IP: 91.189.92.177 80]
Hit http://archive.ubuntu.com natty-security/multiverse i386 Packages
Ign http://archive.ubuntu.com natty-security/main Translation-en_IN
Ign http://archive.ubuntu.com natty-security/main Translation-en
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty-security/multiverse Translation-en
Ign http://archive.ubuntu.com natty-security/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty-security/restricted Translation-en
Hit http://archive.ubuntu.com natty-updates/multiverse i386 Packages
Ign http://archive.ubuntu.com natty/main Translation-en_IN
Ign http://archive.ubuntu.com natty/main Translation-en
Ign http://archive.ubuntu.com natty/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty/multiverse Translation-en
Ign http://archive.ubuntu.com natty/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty/restricted Translation-en
Ign http://archive.ubuntu.com natty/universe Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/main Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/main Translation-en
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/multiverse Translation-en
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/restricted Translation-en
Ign http://archive.ubuntu.com natty-updates/universe Translation-en_IN
Ign http://archive.ubuntu.com natty-updates/universe Translation-en
W: GPG error: http://archive.ubuntu.com natty-security InRelease: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty-security_InRelease - RunGPGV (2: No such file or directory)
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.92.177 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

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

Have you tried switching software source?

Revision history for this message
RajaSekharReddy Genupula (genupulas) said :
#2

sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

do them one by one in terminal .

Revision history for this message
Gaurav Krishna (krishna-gaurav43) said :
#3

Thanks for ur answers.
After doing all this stuff...I can install all packages except some like when I tried to install JDE, It again shows "Fix Broken Packages"

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Do you mean Oracle Java? It's not packaged due to license but there is this:
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html

Can you help with this problem?

Provide an answer of your own, or ask Gaurav Krishna for more information if necessary.

To post a message you must log in.