Ubuntu: Ubuntu 12.04 apt directory corrupted



Question:

I have recently installed ubuntu 12.04 on my old HP dv6646us laptop. I was trying to install jdk7 (Java Development Kit 7) on it and tried many things. Long story short, I think I corrupted the /var/cache/apt directory. Software Center is now not working. I am running Windows Vista and Ubuntu 12.04 on this machine as dual boot.

Here is the output of an ls -l on the /var/cache/apt directory

jmk@ubuntu:/var/cache/apt$ ls -l  ls: cannot access srcpkgcache.bin: Input/output error  total 4  drwxr-xr-x 3 root root 4096 Mar  6 21:57 archives  -????????? ? ?    ?       ?            ? srcpkgcache.bin  

As you can see srcpkgcache.bin is messed up. I am completely new to ubuntu and I did try this:

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

and then

sudo apt-get update  

but that did not work.

Is there anyway to get this fixed without re-installing ubuntu?


Solution:1

Don't worry about the /var/cache/apt/pkgcache.bin and /var/cache/apt/srcpkgcache.bin files.It would be automatically created after running sudo apt-get update and sudo apt-get install package-name commands.

This is not the cause of your software-center not working problem.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »