> ## Documentation Index
> Fetch the complete documentation index at: https://help.gorelo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Gorelo Agent 無法安裝

> 使用 PowerShell 前置條件檢查、支援的作業系統清單與 Windows、macOS 端點的常見修復方式，排除 Gorelo Agent 安裝失敗的問題。

偶爾你可能會遇到 Gorelo Agent 安裝問題。以下是一些需要考慮的事項。

## 支援的作業系統

Gorelo 僅支援目前仍受供應商（Microsoft/Apple）支援的作業系統。

* [**<u>https://endoflife.date/windows</u>**](https://endoflife.date/windows)
* [**<u>https://endoflife.date/windows-server</u>**](https://endoflife.date/windows-server)
* [**<u>https://endoflife.date/macos</u>**](https://endoflife.date/macos)

## 透過 PowerShell 進行前置條件檢查

Gorelo 提供可透過 PowerShell 執行的簡單前置條件檢查。

1. 在發生 agent 問題的電腦上開啟一個提升權限的 PowerShell 視窗。
2. 貼上下列指令並按 **Enter**：

```text theme={null}
Invoke-Expression (Invoke-WebRequest -Uri "https://gist.githubusercontent.com/mikelgorelo/e5bcac91d2fddd165a2fd56a675ebb3a/raw/dd21bcf13480e366a569ae06fa43b9f3c57fa5d8/gorelo-check.ps1" -UseBasicParsing).Content
```

3. 依下表逐一解決失敗項目，並確保修復在 PowerShell 工作階段與重新開機後仍然存在。

| Check                            | **❌ 失敗訊息**                                                                                                                                                                                                                                                                                                                                       | **✅ 疑難排解**                                                                                                                                                                              |
| :------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PowerShell Version Check**     | `FAIL: PowerShell version X.X is below the required version 5.1`                                                                                                                                                                                                                                                                                 | <ul><li>從 Microsoft 下載並安裝 Windows Management Framework 5.1</li><li>對 Windows 10/11，使用 Windows Update 更新 PowerShell</li><li>使用 `$PSVersionTable.PSVersion` 驗證安裝</li></ul>                |
| **System Drive Space Check**     | <ul><li>`FAIL: Free space is less than 300 MB (Current: X MB)`</li><li>`FAIL: Unable to get drive info`</li><li>`FAIL: Unable to get System Drive`</li></ul>                                                                                                                                                                                     | <ul><li>執行磁碟清理以釋放空間</li><li>檢查並移除不必要的大型檔案</li><li>確認系統磁碟可存取且正確掛載</li><li>使用 `chkdsk /f` 檢查磁碟健康度</li></ul>                                                                               |
| **Processor Architecture Check** | `FAIL: Non-64-bit processor architecture detected: X`                                                                                                                                                                                                                                                                                            | <ul><li>確認系統符合 64 位元需求</li><li>檢查是否在 64 位元硬體上執行 32 位元 Windows</li></ul> 支援 ARM64，例如 Snapdragon                                                                                          |
| **Registry Permission Check**    | `FAIL: Registry read/write permission check. Error: [specific error]`                                                                                                                                                                                                                                                                            | <ul><li>以系統管理員執行指令稿</li><li>檢查 HKLM:\SOFTWARE\Gorelo 的權限</li><li>確認防毒軟體未封鎖登錄存取</li><li>使用 RegEdit 檢查登錄機碼的可存取性</li></ul>                                                                 |
| **URL Accessibility Checks**     | `FAIL: URL check for [Description] ([URL]). Error: [specific error] `                                                                                                                                                                                                                                                                            | <ul><li>檢查網際網路連線</li><li>確認 DNS 解析（對網域執行 `nslookup`）</li><li>檢查防火牆設定</li><li>如適用，確認 proxy 設定</li></ul>                                                                                  |
| **Event Log Permission Check**   | `FAIL: Event log read/write permission check. Error: [specific error]`                                                                                                                                                                                                                                                                           | <ul><li>以系統管理員執行指令稿</li><li>檢查 Event Log 服務是否執行中（`Get-Service EventLog`）</li><li>確認 Application event log 的權限</li><li>手動檢查 Event Viewer 功能</li></ul>                                    |
| **Environment Variable Check**   | <ul><li>`FAIL: The PATH environment variable contains 'system32' but not 'System32\WindowsPowerShell\v1.0'`</li><li>`FAIL: The PATH environment variable contains 'System32\WindowsPowerShell\v1.0' but not 'system32'`</li><li>`FAIL: The PATH environment variable does not contain 'system32' or 'System32\WindowsPowerShell\v1.0'`</li></ul> | <ul><li>在系統內容中檢查 System PATH 變數</li><li>確認 Windows 目錄結構</li><li>若已被修改，請修復／還原系統 PATH</li><li>與正常系統的 PATH 變數比較</li></ul>                                                                  |
| **Time Synchronization Check**   | `FAIL: Time mismatch detected! [time details]`                                                                                                                                                                                                                                                                                                   | <ul><li>檢查 Windows Time 服務是否執行中</li><li>強制時間同步：`w32tm /resync`</li><li>確認時區設定</li><li>檢查到 [**time.windows.com**](http://time.windows.com) 的網路連線</li><li>在 Windows 設定中設定自動時間同步</li></ul> |

## 記錄

Gorelo 會將所有內容記錄到：

```text theme={null}
%programfiles%\Gorelo\LogFiles\ 
```

隨著安裝進行，安裝程式會在每個階段建立額外的資料夾並在其中放置記錄檔：

**InstallerHandler** > **Installer** > **Shell > Agent**

歡迎查看下列記錄 — 這裡會出現最常見的問題：

```text theme={null}
%programfiles%\Gorelo\LogFiles\Installer\diagnostics**.log
```

```text theme={null}
%programfiles%\Gorelo\LogFiles\Agent\diagnostics**.log
```

如果 Gorelo 支援團隊要求記錄檔，請將整個 **LogFiles** 資料夾以 .zip 寄出。

## 仍有問題？

如果你解決了 **Gorelo Agent Check** 中所有失敗項目後仍遇到安裝問題，請直接聯絡 Gorelo 支援團隊。透過左下角選單的「?」圖示使用支援聊天。
