1

I get errors when I try to install any software. The errors are

Reading package lists... Error!
E: Could not open file /var/cache/apt/pkgcache.bin - open (22: Invalid argument)
E: Failed to truncate file - ftruncate (9: Bad file descriptor)
E: The package lists or status file could not be parsed or opened.

When I try to update a system with sudo apt-get update, I encounter other errors like

W: Failed to fetch http://tz.archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages  404  Not Found [IP: 91. 189. 92. 192 80]

and many others.

I am new to Ubuntu.

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
Abu Ayman
  • 11
  • 2
  • @jokerdino The 404 error here is not from a PPA. So are you sure [this](http://askubuntu.com/questions/65911/how-can-i-fix-a-404-error-using-a-ppa) is really the best question to dupe this to? – Eliah Kagan Jun 29 '12 at 10:19
  • @EliahKagan I always understood that question as "fix the problem _using_ a PPA". Probably that is the source of this problem. I still think this we have covered this issue somewhere.. – jokerdino Jun 29 '12 at 10:27
  • @jokerdino Well, both that question's error messages and its answers are PPA-specific. And why would you *use* a PPA to fix a 404 message about a package available in an official repository? I agree that this is almost certainly a duplicate, of something. Maybe ask in chat? – Eliah Kagan Jun 29 '12 at 10:34
  • @EliahKagan My mistake, really. – jokerdino Jun 29 '12 at 10:46

1 Answers1

0

Try this:

  1. Run gksudo gedit /etc/apt/sources.list

  2. Add these lines to it

    deb http://it.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
    deb-src http://it.archive.ubuntu.com/ubuntu/ precise main universe restricted multiverse
    
    deb http://security.ubuntu.com/ubuntu precise-security main universe restricted multiverse
    deb-src http://security.ubuntu.com/ubuntu precise-security main universe restricted multiverse
    
    deb http://it.archive.ubuntu.com/ubuntu/ precise-updates main universe restricted multiverse
    deb-src http://it.archive.ubuntu.com/ubuntu/ precise-updates main universe restricted multiverse
    
  3. Save the file and quit the text editor.

  4. Run sudo apt-get update.

Eliah Kagan
  • 116,445
  • 54
  • 318
  • 493
  • Thanks for trying to help, i still get the same errors.. – Abu Ayman Jun 28 '12 at 10:41
  • 2
    Why specifically the Italian mirror? Also, **why *add* these lines, rather than changing the current ones to the Italian mirror?** With multiple mirrors enabled providing the same software, there is no guarantee that the working mirror will be used. – Eliah Kagan Jun 29 '12 at 10:18