事象
久しぶりにVagrantのFreeBSDをビルドするとrepository meta has wrong version 2
というエラーが発生しました。rsyncで同期していたのでそれが原因かと思い、Vagrantfileからrsyncを外すと起動はしましたが、pkgコマンドを使用すると同じエラーが出ました。しょうがないのでpkgコマンドは無視してApacheをソースからインストールしましたが、今度は別のエラーが出ました。
Boxファイル
generic/freebsd11
FreeBSDのバージョンは11.3
エラー内容
pkgコマンドのエラー
==> default: Installing rsync to the VM...
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
pkg install -y rsync
Stdout from the command:
Updating FreeBSD repository catalogue...
Fetching meta.txz: . done
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: .......... done
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!
Stderr from the command:
pkg: repository meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
pkg: repository meta has wrong version 2
pkg: repository meta has wrong version 2
makeコマンドのエラー
===> Building/installing dialog4ports as it is required for the config dialog
===> Cleaning for dialog4ports-0.1.6
===> Skipping 'config' as NO_DIALOG is defined
/!\ ERROR:/!\
Ports Collection support for your FreeBSD version has ended and no ports are guaranteed to build on this system.Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
***Error code 1
Stop.
make[3]: stopped in /usr/ports/ports-mgmt/dialog4ports
***Error code 1
Stop.
make[2]:stopped in /usr/ports/ports-mgmt/dialog4ports
===> Options unchanged
/!\ ERROR:/!\
Ports Collection support for your FreeBSD version has ended and no ports are guaranteed to build on this system.Please upgrade to a supported release.
No support will be provided if you silence this message by defining
ALLOW_UNSUPPORTED_SYSTEM.
***Error code 1
Stop.
make[1]:stopped in /usr/ports/www/apache24/
**Error code 1
Stop.
make:stopped in /usr/ports/www/apache24
原因
makeのコマンドにあるようにOSのバージョンのサポートが終了したためです。
Ports Collection support for your FreeBSD version has ended and no ports are guaranteed to build on this system.Please upgrade to a supported release.
現在のサポートモデルでは、各メジャーバージョンの stable ブランチは、 明示的に 5 年間サポートされますが、各ポイントリリースのサポート期間は、 次のポイントリリースの公開後 3 ヵ月までとなります。
対応方法
方法は2つあります、OSのバージョンを上げるか、古いバージョンでも無視する方法です。
エラーを無視するにはALLOW_UNSUPPORTED_SYSTEM
という環境変数に1をセットします。
export ALLOW_UNSUPPORTED_SYSTEM=1