0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

FreeBSDのpkgコマンドで`repository meta has wrong version 2`エラー

Posted at

事象

久しぶりに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.

FreeBSDでmakeコマンドでエラーが出る

現在のサポートモデルでは、各メジャーバージョンの stable ブランチは、 明示的に 5 年間サポートされますが、各ポイントリリースのサポート期間は、 次のポイントリリースの公開後 3 ヵ月までとなります。

サポートされている FreeBSD のリリース

対応方法

方法は2つあります、OSのバージョンを上げるか、古いバージョンでも無視する方法です。
エラーを無視するにはALLOW_UNSUPPORTED_SYSTEMという環境変数に1をセットします。

export ALLOW_UNSUPPORTED_SYSTEM=1
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?