static-php-cli/assets/zh_guide_troubleshooting.md.DSUIb51x.js
2025-07-29 03:09:27 +00:00

2 lines
3.2 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as o,c as t,o as a,af as r}from"./chunks/framework.PeLcR_tw.js";const u=JSON.parse('{"title":"故障排除","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/troubleshooting.md","filePath":"zh/guide/troubleshooting.md"}'),s={name:"zh/guide/troubleshooting.md"};function c(d,e,i,n,l,p){return a(),t("div",null,e[0]||(e[0]=[r('<h1 id="故障排除" tabindex="-1">故障排除 <a class="header-anchor" href="#故障排除" aria-label="Permalink to “故障排除”"></a></h1><p>使用 static-php-cli 过程中可能会碰到各种各样的故障,这里将讲述如何自行查看错误并反馈 Issue。</p><h2 id="下载失败问题" tabindex="-1">下载失败问题 <a class="header-anchor" href="#下载失败问题" aria-label="Permalink to “下载失败问题”"></a></h2><p>下载资源问题是 spc 最常见的问题之一。主要是由于 spc 下载资源使用的地址一般均为对应项目的官方网站或 GitHub 等,而这些网站可能偶尔会宕机、屏蔽 IP 地址。 在遇到下载失败后,可以多次尝试调用下载命令。</p><p>当下载资源时,你可能最终会看到类似 <code>curl: (56) The requested URL returned error: 403</code> 的错误,这通常是由于 GitHub 限制导致的。 你可以通过在命令中添加 <code>--debug</code> 来验证,会看到类似 <code>[DEBU] Running command (no output) : curl -sfSL &quot;https://api.github.com/repos/openssl/openssl/releases&quot;</code> 的输出。</p><p>要解决这个问题,可以在 GitHub 上 <a href="https://github.com/settings/tokens" target="_blank" rel="noreferrer">创建</a> 一个个人访问令牌,并将其设置为环境变量 <code>GITHUB_TOKEN=&lt;XXX&gt;</code>。</p><p>如果确认地址确实无法正常访问,可以提交 Issue 或 PR 更新地址或下载类型。</p><h2 id="doctor-无法修复某些问题" tabindex="-1">Doctor 无法修复某些问题 <a class="header-anchor" href="#doctor-无法修复某些问题" aria-label="Permalink to “Doctor 无法修复某些问题”"></a></h2><p>在绝大部分情况下doctor 模块都可以对缺失的系统环境进行自动修复和安装,但也存在特殊的环境无法正常使用自动修复功能。</p><p>由于系统限制例如Windows 下无法自动安装 Visual Studio 等软件),自动修复功能无法用于某些项目。 在遇到无法自动修复功能时,如果遇到 <code>Some check items can not be fixed</code> 字样,则表明无法自动修复。 请根据终端显示的方法提交 Issue 或自行修复环境。</p><h2 id="编译错误" tabindex="-1">编译错误 <a class="header-anchor" href="#编译错误" aria-label="Permalink to “编译错误”"></a></h2><p>遇到编译错误时,如果没有开启 <code>--debug</code> 日志,请先开启调试日志,然后确定报错的命令。 报错的终端输出对于修复编译错误非常重要。 在提交 Issue 时,请上传终端日志的最后报错片段(或整个终端日志输出),并且包含使用的 <code>spc</code> 命令和参数。</p><p>如果你是重复构建,请参考 <a href="./manual-build.html#多次构建">本地构建 - 多次构建</a> 章节。</p>',13)]))}const _=o(s,[["render",c]]);export{u as __pageData,_ as default};