[talk] Why am I no longer able to install FreeBSD packages?

Shawn Webb shawn.webb at hardenedbsd.org
Tue Apr 10 10:57:42 EDT 2018


On Tue, Apr 10, 2018 at 09:27:10AM -0400, James E Keenan wrote:
> Background:
> 
> Since October 2016 I have run FreeBSD-11.0 in a VMWare VM (currently, VMWare
> Workstation 14 Player).  Broadly speaking, I've used this almost entirely
> for QA purposes for Perl 5.  I've gotten comfortable installing packages,
> mainly via 'pkg' but sometimes via 'make install' in the ports tree.  And
> since Brian Callahan's talk at NYCBUG in January I've had ports accepted in
> both FreeBSD and OpenBSD.*
> 
> But in the last week, whenever I try to use 'pkg' to install libraries on
> FreeBSD, I am likely to get a message like this:
> 
> #####
> $ sudo pkg install shared-mime-info
> Updating FreeBSD repository catalogue...
> Fetching meta.txz: 100%   944 B   0.9kB/s    00:01
> Fetching packagesite.txz:  100%    6 MiB   3.2MB/s    00:02
> Processing entries:   0%
> pkg: Newer FreeBSD version for package libxfce4util:
> - package: 1101001
> - running kernel: 1100122
> pkg: repository FreeBSD contains packages for wrong OS version:
> FreeBSD:11:amd64
> Processing entries: 100%
> Unable to update repository FreeBSD
> Error updating repositories!
> #####
> 
> Now, I have the feeling that this is related to the age of my version of
> FreeBSD.**  I have spent hours doing internet searches on these message,
> have called 'pkg clear -a' repeatedly as per the results of those searches
> yet still experienced this problem.  But I confess I do not understand
> FreeBSD's release cycle at all.  So here are my questions:
> 
> Questions:
> 
> * What exactly is "wrong" about my OS?
> 
> * Did that "wrong" status come into being on some specific date (e.g., April
> 1)?
> 
> * What configuration files on my system do I need to examine to get data on
> this situation?
> 
> * Can I change those configuration files to say, in effect, "Don't worry
> about 11.1 ports; continue to direct me to 11.0 ports"?
> 
> * If not, is my FreeBSD-11.0 installation now basically hopeless when it
> comes to installing packages?
> 
> * If that is the case, can I upgrade to 11.1 within the VM -- and what risks
> would that entail?

Hey Jim,

We've been hit with this pretty hard in HardenedBSD. FreeBSD
introduced a new feature in pkg(8) that places a guard when your
system's KBI is older than the KBI of the package build. FreeBSD now
wants to enforce updating the base OS prior to updating installed
packages.

`uname -K` will tell you what version the kernel is at.

So, these are the steps you'll need to take to update:

1. Update base (either via src compile or freebsd-update, whichever
   you prefer)
2. reboot
3. pkg clean -y
4. pkg update -f
5. pkg upgrade

With HardenedBSD being more of a "rolling release" type of experience,
we hit this feature a lot.

Let me know if you have any other questions.

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

Tor-ified Signal:    +1 443-546-8752
Tor+XMPP+OTR:        lattera at is.a.hacker.sx
GPG Key ID:          0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20180410/f2293918/attachment.bin>


More information about the talk mailing list