DVSwitch-ServerをRaspberry Pi Zero 2 Wで動かす完全ガイド(Bullseye対応)失敗、修復例

概要

Raspberry Pi Zero 2 W で DVSwitch-Server を動かすための手順をまとめました。Bullseye(Debian 11)には DVSwitch 専用リポジトリがないため、bookworm スクリプトでリポジトリを登録し、suite を buster に固定するのがポイントです。


前提条件

  • OS:Raspberry Pi OS Bullseye Lite(armhf)
  • 対象機種:Raspberry Pi Zero 2 W
  • root でのコマンド実行権限があること(sudo su - で昇格可能な状態)
  • インターネットへの接続が確立していること

OSイメージのダウンロード先:
https://ftp.jaist.ac.jp/pub/raspberrypi/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2025-05-07

📝 なぜ Bullseye? DVSwitch の動作実績が Bullseye(Debian 11 ベース)で確認されているため。DVSwitch は Bullseye 専用リポジトリを提供していないので、buster 用パッケージを流用します。

手順

1. root に切り替えて作業ディレクトリへ移動

⚠️ 以降のコマンドはすべて root で実行します。sudo を都度付けても構いませんが、sudo su - で root に昇格してから進めると手順が簡潔になります。
  1. sudo su - を実行して root に昇格する。
  2. cd /tmp を実行して作業ディレクトリに移動する。

2. DVSwitch リポジトリの登録

  1. wget http://dvswitch.org/bookworm を実行してブートストラップスクリプトを取得する。
  2. chmod +x bookworm を実行して実行権限を付与する。
  3. apt update --allow-releaseinfo-change を実行してリポジトリ情報の変更を許可しながら更新する。
  4. ./bookworm を実行してリポジトリを登録する。
⚠️ --allow-releaseinfo-change-- は ASCII のハイフン 2 つです。全角ダッシュ(–)をコピペすると E: The update command takes no arguments エラーになります。
📝 ./bookworm は内部で set -o errexit を使用しています。途中のコマンドが失敗すると無言で中断し、/etc/apt/sources.list.d/dvswitch.list が作成されないまま終了します。失敗した場合は bash -x ./bookworm 2>&1 | tee /tmp/bookworm_run.log でトレースを確認してください。

2. 確認

以下のコマンドでリポジトリファイルとキーリングが作成されていることを確認する:

ls /etc/apt/sources.list.d/dvswitch.list
ls /usr/share/keyrings/dvswitch-keyring.gpg

期待される出力:

/etc/apt/sources.list.d/dvswitch.list
/usr/share/keyrings/dvswitch-keyring.gpg

3. suite を buster に修正

⚠️ ./bookworm 実行直後の dvswitch.list は suite が bookworm になっています。Bullseye 環境では buster 用パッケージセットで依存関係が正しく解決されるため、必ず buster に書き換えてください

編集対象ファイル:/etc/apt/sources.list.d/dvswitch.list

変更前:

deb [signed-by=/usr/share/keyrings/dvswitch-keyring.gpg] http://dvswitch.org/DVSwitch_Repository bookworm hamradio

変更後:

deb [signed-by=/usr/share/keyrings/dvswitch-keyring.gpg] http://dvswitch.org/DVSwitch_Repository buster hamradio
  1. (推奨)sed コマンドで一括置換する:
sed -i 's/ bookworm hamradio/ buster hamradio/' /etc/apt/sources.list.d/dvswitch.list
  1. (手動の場合)nano /etc/apt/sources.list.d/dvswitch.list を開いて bookwormbuster に書き換え、「Ctrl + X」→「Y」→「Enter」で保存する。

3. 確認

grep DVSwitch_Repository /etc/apt/sources.list.d/dvswitch.list

期待される出力(buster hamradio になっていること):

deb [signed-by=/usr/share/keyrings/dvswitch-keyring.gpg] http://dvswitch.org/DVSwitch_Repository buster hamradio

4. パッケージのインストール

  1. apt update を実行してパッケージ一覧を更新する。
  2. apt install dvswitch analog-reflector stfu -y を実行して DVSwitch 一式をインストールする。

インストールされる主なコンポーネント:

  • dvswitch(メタパッケージ):dvswitch-basedvswitch-dashboard 等を依存として引き込む
  • analog-reflector:hUC 対応アナログ反射器(WebUI あり)
  • stfu:BrandMeister ODMRTP 直結用モジュール
  • その他:mmdvm-bridgemd380-emulighttpdphpmosquitto など
⚠️ インストール中に Error, YSFHosts.txt file does not seem to be valid が表示されますが、インストール自体は正常に完了します。設定完了後に解消します。

4. 確認

apt update

期待される出力(DVSwitch リポジトリが参照されていること):

Hit:1 http://dvswitch.org/DVSwitch_Repository buster InRelease
dpkg -l dvswitch analog-reflector stfu

期待される出力(ii が先頭に付いていること):

ii  dvswitch        1.6.0-...
ii  analog-reflector  1.1.30-...
ii  stfu            0.3.3-...

WebUI への接続確認

インストール完了後、ブラウザで以下の URL にアクセスして DVSwitch の WebUI が表示されることを確認する:

http://<Raspberry Pi の IP アドレス>:2812/

例:http://192.168.1.59:2812/

✅ 2026年6月時点の実機(Raspberry Pi OS Bullseye armhf)で WebUI 表示を確認済み。

トラブルシュート

./bookworm が途中で止まり dvswitch.list が作成されない

原因:スクリプト内の set -o errexit により、途中のコマンドが失敗すると無言で中断します。

対処:以下のコマンドでトレースを取得して失敗箇所を特定する:

bash -x ./bookworm 2>&1 | tee /tmp/bookworm_run.log
tail -30 /tmp/bookworm_run.log

apt install で「Unable to locate package dvswitch-server」が出る

原因dvswitch-server というパッケージ名は現在のリポジトリに存在しません。

対処:パッケージ名を dvswitch(メタパッケージ)に変更する:

apt install dvswitch analog-reflector stfu -y
✅ 2026年6月時点の実機で dvswitch メタパッケージによる全コンポーネントのインストールを確認済み。

buster スクリプト(./buster)を実行したが dvswitch.list が作成されない

原因http://dvswitch.org/DVSwitch_Repository/dvswitch.gpg.key が 404 Not Found のため、GPG キー取得のステップで set -o errexit が働いて中断します。

✅ 2026年6月時点の実機で確認:buster スクリプトは GPG キー URL が 404 のため動作不能。bookworm スクリプトは正常に動作し、リポジトリ登録・GPG キー配置ともに成功。

対処:buster スクリプトは使用せず、手順 2 の bookworm スクリプトを使用してください。


まとめ

  • Bullseye では bookworm スクリプトでリポジトリを登録し、suite を buster に手動で固定するのがポイント。
  • apt update --allow-releaseinfo-change でリポジトリ情報の変更を許可する。
  • パッケージ名は dvswitch-server ではなく dvswitch(メタパッケージ)を指定する。
  • 最終的に apt install dvswitch analog-reflector stfu -y で DVSwitch 一式を導入する。
JJ2YYK
  • JJ2YYK

コメントする

メールアドレスが公開されることはありません。 が付いている欄は必須項目です