> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/ja/toraburushtinguto-faq/troubleshooting/package-installation-issues/troubleshooting-failed-chocolatey-packages.md).

# 失敗した chocolatey パッケージのトラブルシューティング

前のセクションで説明したとおり、chocolatey パッケージのインストールは複数の段階で構成されます:

1. chocolatey 環境と変数の初期化
2. インストール対象ソフトウェアの既存インストールの確認
3. 既存インストールの可能なアンインストール
4. バイナリファイルのダウンロード
5. ダウンロードしたセットアップバイナリを使用した実際のインストール。
6. インストール後に実行される後処理

各段階には失敗してインストールを中止させる可能性がありますが、失敗の可能性が最も高いのは 3、4、および 5 の段階です。

## 正しいエラーメッセージの見つけ方

失敗したインストールでは、標準の chocolatey エラースタックメッセージが返され、次のようになります。

{% code overflow="wrap" fullWidth="false" %}

```log
2021-08-23 09:48:58,465 [DEBUG] - 'C:\ProgramData\chocolatey\lib\generic-autodesk-navisworks-freedom-2022' を移動中
 から 'C:\ProgramData\chocolatey\lib-bad\generic-autodesk-navisworks-freedom-2022' へ
2021-08-23 09:48:58,480 [WARN ] - これは 1/3 回目の試行です。300 ミリ秒後に再試行します。
 エラーを警告に変換:
 (5) アクセスが拒否されました: [\\?\C:\ProgramData\chocolatey\lib-bad\generic-autodesk-navisworks-freedom-2022]
```

{% endcode %}

その `アクセスが拒否されました` メッセージは chocolatey の標準エラースタックに属しており、無視する必要があります。パッケージのインストール失敗の原因となっている実際のエラーは、ログファイルの前の方の行のどこかにあります。タグ `[ERROR]` を検索すると、正しいメッセージを見つけるのに役立ちます。

この例では、実際のエラーは上部（ダウンロードの 404）で発生していますが、その後の chocolatey エラースタックでは、誤解を招く 'Access is denied' メッセージが表示されています。

<figure><img src="/files/e5804f2fa4b97c54f095769028916b5282fa47b3" alt=""><figcaption><p>上部に実際のダウンロードエラーがあり、下部に chocolatey の標準エラースタックが続くため、誤解を招く可能性があります。</p></figcaption></figure>

## 失敗したインストールの例

### 初期化中に発生するエラー

初期化フェーズでは、次の理由でエラーが発生することがあります。

* chocolatey のインストール自体に問題がある場合（壊れた設定、欠落ファイル）:

{% code overflow="wrap" %}

```log
2023-10-10 10:28:32,523 [ERROR] - chocolatey.infrastructure.app.configuration.ConfigFileSettings 型の応答の逆シリアル化中にエラー:
 '.'、16進値 0x00 は無効な文字です。1 行目、1 文字目。
2023-10-10 10:28:32,535 [ERROR] - '.'、16進値 0x00 は無効な文字です。1 行目、1 文字目。
2023-10-10 10:28:32,537 [DEBUG] - 1 で終了します
```

{% endcode %}

{% hint style="warning" %}
これは（やや似た）メッセージが `chocolatey.log` にも現れる可能性があるので注意してください。ただし、これは無視してよく、対応は不要です！

{% code overflow="wrap" %}

```log
2023-11-21 11:46:10,365 [ERROR] - chocolatey.infrastructure.app.configuration.ConfigFileSettings 型のシリアル化中にエラー:
 パス 'C:\ProgramData\chocolatey\config\chocolatey.config.update' へのアクセスが拒否されました。
```

{% endcode %}
{% endhint %}

* ネットワークの問題。RealmJoin の nuget サーバーに到達できない場合（参照 [インフラに関する考慮事項](/ja/pei-bu/infrastructure.md#realmjoin-connection-endpoints)):

{% code overflow="wrap" %}

```log
2023-09-08 13:01:47,335 [ERROR] - generic-adobe-reader-dc-continuous はインストールされていません。指定されたソースではパッケージが見つかりませんでした。
```

{% endcode %}

* 必須のパッケージ引数が不足している場合の問題:

{% code overflow="wrap" %}

```log
2023-09-14 13:53:33,982 [ERROR] - ERROR: 必須引数 'Serial' が指定されていないため、中止します！
```

{% endcode %}

### ダウンロード中に発生するエラー

バイナリのダウンロードに関するエラーでは、エラーメッセージに通常、次を含むダウンロード URL が表示されます。 `cdn.realmjoin.com`、例:

{% code overflow="wrap" %}

```log
2023-10-16 13:04:52,952 [ERROR] - ERROR: リモートファイルが存在しない、認証されていない、または URL 'https://cdn.realmjoin.com/blobs/generic/generic-adobe-acrobat-dc-continuous/AcrobatDCUpd2300620320.msp' に対して禁止されています。Exception calling "GetResult" with "0" argument(s): "ホストマシン上のソフトウェアによって既存の接続が中断されたため、トランスポート接続からデータを読み取れません。"
```

{% endcode %}

{% code overflow="wrap" %}

```log
2021-08-23 09:36:08,874 [ERROR] - ERROR: リモートファイルが存在しない、認証されていない、または URL 'https://cdn.realmjoin.com/blobs/generic/generic-adobe-acrobat-dc-continuous/AcrobatDCUpd2300620320.msp' に対して禁止されています。Exception calling "GetResult" with "0" argument(s): "ディスクの空き領域が不足しています"
```

{% endcode %}

### （アン）インストール処理中に発生するエラー

ダウンロードしたバイナリファイルを使用する実際の（アン）インストール処理中に発生するエラーは、次の 2 つを使うことで最もよくトラブルシュートできます。

1. セットアップ処理によって返される終了コード。
2. セットアップ処理によって書き込まれるログファイル。以下の場所にあります。 `C:\WINDOWS\Logs\RealmJoin\Packages\<package-id>\`、ただしインストーラーがログ書き込み機能を提供している場合。

{% hint style="info" %}
MSI インストーラーが使用された場合、終了コードは標準化されており、 [こちら](https://learn.microsoft.com/en-us/windows/win32/msi/error-codes)で確認できます。さらに、MSI インストーラーは常に上記のフォルダーにログファイルを書き込みます。特に終了コード `1603` が返された場合（一般的な MSI エラー）、トラブルシューティングには MSI ログファイルが必須です。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.realmjoin.com/ja/toraburushtinguto-faq/troubleshooting/package-installation-issues/troubleshooting-failed-chocolatey-packages.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
