4

I have been installing FreeBSD 12.0-CURRENT in a new desktop.

I lost the wifi connection while updating the system.

After that, trying to install aterm with the command:

sudo pkg install aterm

I got the following errors:

Proceed with this action [y/N]: y
Fetching aterm-1.0.7.txz: 0% of 70 KiB                                                                                 
pkg: cached package aterm-1.0.7: size mismatch, fetching from remote
Fetching aterm-1.0.7: 0% of 70 KiB                                                                                 
pkg: cached package aterm-1.0.7: size mismatch, cannot continue

I have noticed it does not work when installing other packages too.

What to do?

1 Answer 1

7

It seems this is some sort of corruption of the packages cache.

To solve it I did:

sudo pkg clean
sudo rm -rf /var/cache/pkg/*
sudo pkg update -f

After that, I was able to install packages again.

I based myself on this thread from the FreeBSD forums pkg 1.3.0: size mismatch cannot continue with a similar problem.

2
  • 2
    All you need to do is run pkg update -f. No requirement to remove /var/cache/pkg/*.
    – Zilinski
    Commented Mar 12, 2018 at 3:09
  • Unfortunately I do not remember the specifics after all this time; I had serious problems dealing with that corruption case, and only deleting the directory seemed to fix it. Commented Mar 12, 2018 at 9:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .