Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After installing Ubuntu 12.04 I was trying to install Kile in order to edit .tex files. But this message showed up on attempting to install Kile and Updates:

W:Failed to fetch
gzip:/var/lib/apt/lists/partial/security.ubuntu.com_ubuntu_dists_precise-security_restricted_binary-i386_Packages
Hash Sum mismatch , E:Some index files failed to download. They have been ignored, or old ones used instead

Now I can't install any software at all. What can I do?

EDITING :

I have done which you said . But now I'm trying to install Okular but this is showing :-(

share|improve this question
add comment

1 Answer 1

This should fix it: http://ubuntuforums.org/showpost.php?p=11593258&postcount=2.

From the post above:

Remove the files with

sudo rm -R /var/lib/apt/lists/partial/*

then run

sudo apt-get update && sudo apt-get upgrade

If it doesn't work, try this:

sudo rm -rf `find /var/lib/apt/lists/ | grep -v gpg`

EDIT: Okay, try this:

sudo fuser -vvv /var/lib/dpkg/lock
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 rm /var/cache/apt/*.bin
sudo mkdir /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial
LANG=C;sudo apt-get clean
LANG=C;sudo apt-get autoclean
LANG=C;sudo apt-get --purge autoremove
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824
sudo dpkg --clear-avail
sudo dpkg --configure -a
LANG=C;sudo apt-get -f install
LANG=C;sudo apt-get --fix-missing install
LANG=C;sudo apt-get update -o APT::Cache-Limit=25165824 && sudo apt-get dist-upgrade

(from https://answers.launchpad.net/ubuntu/+source/update-manager/+question/194077)

share|improve this answer
    
Please check my editing on the post . –  QFT dreamer Jan 1 '13 at 7:05
    
Okay, see my editing on my answer :) –  MiJyn Jan 3 '13 at 19:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.