pkg 1.3.0: size mismatch cannot continue

Hi,

I use FreeBSD 10.0-RELEASE-p7 and tried to install vim using pkg, which is now version 1.3.0, and got the following:

Code:
fbsd_home:~ bernd$ sudo pkg install vim
Updating repository catalogue
pkg: http://pkg.FreeBSD.org/freebsd:10:x86:64/latest/meta.txz: Not Found
pkg: repository FreeBSD has no meta file, using default settings
FreeBSD repository catalogue is up-to-date, no need to fetch fresh copy
The following 4 packages will be affected (of 584 checked):

New packages to be INSTALLED:
	vim: 7.4.364
	lua52: 5.2.3_2
	ctags: 5.8
	cscope: 15.8a

The process will require 29 MB more space
6 MB to be downloaded

Proceed with this action [y/N]: y
Fetching vim-7.4.364.txz: 100% of 6 MB                                                                                 
pkg: cached package vim-7.4.364: size mismatch, fetching from remote
Fetching vim-7.4.364.txz: 100% of 6 MB                                                                                 
pkg: cached package vim-7.4.364: size mismatch, cannot continue

A new warning that comes with the new version of pkg seems to be that a metafile is missing.
But that aside, what explains the message in the last line of the code presented above? Why doesn't the installation work?

Thank you for any answer....
 
BSDBernd said:
I use FreeBSD 10.0-RELEASE-p7 and tried to install vim using pkg, which is now version 1.3.0,
It received a few updates in the meantime. It's now at 1.3.3 ;)

You may want to try and update pkg first. There were some issues with 1.3.0.
 
Thank you for your answer. I updated the package manager to version 1.3.4 now and got the exact same messages.
What else could have went wrong?
 
Yeah, I've had some struggles with pkg too. The transition from 1.2.x to 1.3.x wasn't easy. You can try any one of these:
Code:
pkg clean # cleans /var/cache/pkg/
rm -rf /var/cache/pkg/* # just remove it all
pkg update -f # forces update  of repository catalog
rm /var/db/pkg/repo-*.sqlite # removes all remote repository catalogs
pkg bootstrap -f # forces reinstall of pkg
You can delete quite a lot but whatever you do, do NOT delete /var/db/pkg/local.sqlite. It contains the database with your installed packages. If you remove it the system will think you have nothing installed.
 
BSDBernd said:
Thank you very much for your help!
The following one of your suggestions did it :). I successfully installed vim.
Code:
sudo pkg update -f

I just want to verify that this solved my issue as well. Thank you.
 
It is not an issue, you just need to use # pkg update,
to update the local copy of the repository, your local copy is just too old
and you get "package size mismatch".
Use # pkg update -f, to be sure. In my experience,
sometimes # pkg update -f is also required after ports-mgmt/pkg upgrade.
 
Thank you very much for your help!
The following one of your suggestions did it :). I successfully installed vim.
Code:
sudo pkg update -f

Hey Bernd,
Thanks for your contribution. I executed this and the one before you and it seems to have solved the size mismatch issue which occured for seemingly all packages to me.
 
Thank you all!
Not to beat a dead horse (this thread I mean :) ) but pkg update -f solved my issue trying to install atop on my 11.2 :)
So it continues to do wonders in 2020 too :D
 
pkg update -f # It always been good to me which makes everything great again. The best of FreeBSD is yet to come - Drive on Pathfinder
 
  • Thanks
Reactions: a6h
Back
Top