Solved pkg: wrong architecture: FreeBSD:12.0:amd64 instead of FreeBSD:12:amd64

Sure its free, but realize that we use pkgs for production and that is a very big challenge when you are stuck with low system and building ports takes ages to complete. Free or not this is critical issue for all.

But as far I know sometimes searching for root issue is bit more quest for an achievement :D
If you are in hurry, you have to pay someone to help you or help you yourself.
The hack that SaMaeL posted seems merely efficient. He just forgot to say that the ALTABI thing must be added in /usr/local/etc/pkg.conf: ALTABI = "FreeBSD:12.0:amd64"
 
The issue itself has been resolved but now we have to wait until all packages have been rebuilt.

I thought all the packages were finished building for 121amd64 yesterday, could you link which build is still in progress?

This situation has reinforced in my mind that production systems should probably be on quarterly (the default), and latest is for bleeding edge! :)
 
I thought all the packages were finished building for amd64 yesterday, could you link which build is still in progress?
You can track everything on the http://pkg-status.freebsd.org site. But I have to admit it can be quite daunting to navigate, it took me a while to understand how to use it.

What I failed to realize however is that the builds may have been done, actually putting up the "new" repositories is done in a separate step. Someone explained that recently and now I can't find that post any more. I'm going to try to dig up more details regarding the whole package build process as there seems to be a lot of confusion and misunderstanding (myself included).

This situation has reinforced in my mind that production systems should probably be on quarterly (the default), and latest is for bleeding edge!
Or, as a lot of us do, set up your own repositories. Yes, it takes a while to build the packages and a bit of time to manage it but you gain so much more control in return. It also makes you completely impervious to issues like this.
 
  • Thanks
Reactions: JAW
You can track everything on the http://pkg-status.freebsd.org site. But I have to admit it can be quite daunting to navigate, it took me a while to understand how to use it.

Mere mortals don’t have all the background information for understanding this conclusively. As a matter of fact, the FreeBSD:12:amd64/latest/ pkg-repository was not updated since February, 2. (s. https://pkg.freebsd.org/FreeBSD:12:amd64/latest/)

BTW, the actual error affects only one of 30k++ records in https://pkg.freebsd.org/FreeBSD:12:amd64/latest/packagesite.txz

fetch -qo - https://pkg.freebsd.org/FreeBSD:12:amd64/latest/packagesite.txz | tar -xzOf - | grep -a "FreeBSD:12.0"
YAML:
{"name":"pkg-devel","origin":"ports-mgmt/pkg-devel","version":"1.13.99.2","comment":"Package manager","maintainer":"pkg@FreeBSD.org","www":"https://wiki.freebsd.org/pkgng","abi":"FreeBSD:12.0:amd64","arch":"freebsd:12.0:x86:64","prefix":"/usr/local","sum":"877847a3a97efe9809f76e59810f541a0e8e2a3ad9a44c5f6d7aec3c19490de4","flatsize":40245881,"path":"All/pkg-devel-1.13.99.2.txz","repopath":"All/pkg-devel-1.13.99.2.txz","licenselogic":"single","licenses":["BSD2CLAUSE"],"pkgsize":9048340,"desc":"Package management tool\n\nWWW: https://wiki.freebsd.org/pkgng","categories":["ports-mgmt"],"shlibs_provided":["libpkg.so.4"],"options":{"DOCS":"on"},"annotations":{"FreeBSD_version":"1200086"},"messages":[{"message":"If you are upgrading from the old package format, first run:\n\n  # pkg2ng","type":"install"}]}
 
If you are in hurry, you have to pay someone to help you or help you yourself.
The hack that SaMaeL posted seems merely efficient. He just forgot to say that the ALTABI thing must be added in /usr/local/etc/pkg.conf: ALTABI = "FreeBSD:12.0:amd64"
This works 👏 repository for latest is completed but still pkg update -f shows error. I recommend this as temporary workaround
 
This works 👏 repository for latest is completed but still pkg update -f shows error. I recommend this as temporary workaround
Just did my first general upgrade with this hack (amd64, FreeBSD-12.1-RELEASE, latest repository) and have no trouble. Not even concerning pkg update -f.
 
If you are in hurry, you have to pay someone to help you or help you yourself.
The hack that SaMaeL posted seems merely efficient. He just forgot to say that the ALTABI thing must be added in /usr/local/etc/pkg.conf: ALTABI = "FreeBSD:12.0:amd64"
You can also give it directly to pkg in the command line like in my example (at least if you are using bash as shell), since this command is one shot it allows to avoid changing configuration files.
 
Code:
# ALTABI=FreeBSD:13.0:amd64 pkg-static update -f
# ALTABI=FreeBSD:13.0:amd64 pkg-static upgrade -f pkg
You obviously need to adapt this command to your version (12.0 ...) if not running current.
I personally don't use bash and this doesn't work with /bin/sh. Seems that not all people have understood how to make your hack function, hence my remark.
 
I just upgraded from 12.0 to 12.1 and got error:

Code:
Installed packages to be UPGRADED:

        pkg: 1.12.0 -> 1.12.0_1


Number of packages to be upgraded: 1


7 MiB to be downloaded.


Proceed with this action? [y/N]: y

pkg: http://pkg.FreeBSD.org/FreeBSD:12:amd64/quarterly/All/pkg-1.12.0_1.txz: Not Found

I tried:
Code:
pkg update -f

After it finished I was able to update:
Code:
pkg-static upgrade -f

cheers
 
Back
Top