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.

I have installed Ubuntu 12.04 in the morning and since than I'm struggling to do a simple update. I have troubles with apt-get. I have tried every solution i found out on the Internet, but didn't work. Here is the error i encounter when I try to

sudo apt-get update

E: Could not open file /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_precise-     updates_multiverse_binary-i386_Packages.IndexDiff - open (2: No such file or directory)

The whole thing started because when I tried to do the updates I received this error :"Requires installation of untrusted packages" and i found a link, I changed settings to accept source code and all other stuff and it still didn't work.

Then i went into another link and i did something like this:

sudo apt-get clean
cd var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update

and after that I had trouble with some keys and I found the solution, but now I have this error.

share|improve this question
    
So you had no problems installing, and can use your computer normally, but this error crops up when you write sudo apt-get update in a console and write your password? Is this correct? Can you provide details as to what you've tried (links please!) –  tucuxi Jul 31 '12 at 12:31

3 Answers 3

If your Internet connection is stable, the repository may be having an issue.Try to change the download server to the best one by following these steps:

Ubuntu Software Center > Edit menu > Software Sources > 'Ubuntu Software' tab > Change 'Download from:' option to 'Other' > Click 'Select best server' and 'Choose server'

Next, close Software sources and Ubuntu Software Center and try updating...

share|improve this answer

You should edit your question to include the information in your last comment (that you moved /var/lib/apt/lists around).

The file that it is not finding is now in /var/lib/apt/lists.old, instead of /var/lib/apt/lists/ - so it cannot find it, and the error message is explaining exactly why.

share|improve this answer

Since you've updated you question with extra info, the try this. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

   sudo rm /var/lib/apt/lists/* -vf

and then do

sudo apt-get update

If you still get issues, the try

sudo apt-get update && sudo apt-get upgrade
share|improve this answer
    
I didn't do this by myself I followed the steps from here link and about what you suggested I receive this: rm: cannot remove `/var/lib/apt/lists/partial': Is a directory –  user1513091 Jul 31 '12 at 12:59
    
Ok that solved the problem with "sudo apt-get update" but now i have again this error "Requires installation of untrusted packages" what to do? –  user1513091 Jul 31 '12 at 13:08
    
See the additional info in my answer. –  Mitch Jul 31 '12 at 13:17

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.