> ## 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. 在遇到代理问题的计算机上打开提升权限的 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 会话和重启之间持久。

| 检查                  | **❌ 失败消息**                                                                                                                                                                                                                                                                                                                                       | **✅ 故障排除**                                                                                                                                                                             |
| :------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **PowerShell 版本检查** | `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>              |
| **系统驱动器空间检查**       | <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>                                                                             |
| **处理器体系结构检查**       | `FAIL: Non-64-bit processor architecture detected: X`                                                                                                                                                                                                                                                                                            | <ul><li>验证系统满足 64 位要求</li><li>检查是否在 64 位硬件上运行 32 位 Windows</li></ul> 支持 ARM64，例如 Snapdragon                                                                                            |
| **注册表权限检查**         | `FAIL: Registry read/write permission check. Error: [specific error]`                                                                                                                                                                                                                                                                            | <ul><li>以管理员身份运行脚本</li><li>检查 HKLM:\SOFTWARE\Gorelo 的权限</li><li>验证防病毒软件未阻止注册表访问</li><li>使用 RegEdit 检查注册表项的可访问性</li></ul>                                                               |
| **URL 可访问性检查**      | `FAIL: URL check for [Description] ([URL]). Error: [specific error] `                                                                                                                                                                                                                                                                            | <ul><li>检查互联网连接</li><li>验证 DNS 解析（对域执行 `nslookup`）</li><li>检查防火墙设置</li><li>如适用，验证代理设置</li></ul>                                                                                        |
| **事件日志权限检查**        | `FAIL: Event log read/write permission check. Error: [specific error]`                                                                                                                                                                                                                                                                           | <ul><li>以管理员身份运行脚本</li><li>检查 Event Log 服务正在运行（`Get-Service EventLog`）</li><li>验证 Application 事件日志的权限</li><li>手动检查事件查看器功能</li></ul>                                                    |
| **环境变量检查**          | <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>                                                                |
| **时间同步检查**          | `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 支持。通过左下角菜单中的 "?" 图标使用支持聊天。
