deploy: 5caaa4d1d465622a0392d746759ced4bc3c48f96

This commit is contained in:
crazywhalecc 2025-03-11 03:50:29 +00:00
parent bcbcc5d7b9
commit 22e2608925
67 changed files with 213 additions and 137 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as i,c as e,o as t,a1 as s}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"Build glibc Compatible Linux Binary","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/build-with-glibc.md","filePath":"en/guide/build-with-glibc.md"}'),a={name:"en/guide/build-with-glibc.md"},n=s("",23),l=[n];function o(c,r,u,b,d,h){return t(),e("div",null,l)}const g=i(a,[["render",o]]);export{m as __pageData,g as default};

View File

@ -0,0 +1,12 @@
import{_ as e,c as i,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),n={name:"en/guide/env-vars.md"},s=a(`<h1 id="environment-variables" tabindex="-1">Environment variables <a class="header-anchor" href="#environment-variables" aria-label="Permalink to &quot;Environment variables&quot;"></a></h1><p>All environment variables mentioned in the list on this page have default values unless otherwise noted. You can override the default values by setting these environment variables.</p><h2 id="environment-variables-list" tabindex="-1">Environment variables list <a class="header-anchor" href="#environment-variables-list" aria-label="Permalink to &quot;Environment variables list&quot;"></a></h2><p>Starting from version 2.3.5, we have centralized the environment variables in the <code>config/env.ini</code> file. You can set environment variables by modifying this file.</p><p>We divide the environment variables supported by static-php-cli into three types:</p><ul><li>Global internal environment variables: declared after static-php-cli starts, you can use <code>getenv()</code> to get them internally in static-php-cli, and you can override them before starting static-php-cli.</li><li>Fixed environment variables: declared after static-php-cli starts, you can only use <code>getenv()</code> to get them, but you cannot override them through shell scripts.</li><li>Config file environment variables: declared before static-php-cli build, you can set these environment variables by modifying the <code>config/env.ini</code> file or through shell scripts.</li></ul><p>You can read the comments for each parameter in <a href="https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini" target="_blank" rel="noreferrer">config/env.ini</a> to understand its purpose.</p><h2 id="custom-environment-variables" tabindex="-1">Custom environment variables <a class="header-anchor" href="#custom-environment-variables" aria-label="Permalink to &quot;Custom environment variables&quot;"></a></h2><p>Generally, you don&#39;t need to modify any of the following environment variables as they are already set to optimal values. However, if you have special needs, you can set these environment variables to meet your needs (for example, you need to debug PHP performance under different compilation parameters).</p><p>If you want to use custom environment variables, you can use the <code>export</code> command in the terminal or set the environment variables directly before the command, for example:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># export first</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">4</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># or direct use</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><p>Or, if you need to modify an environment variable for a long time, you can modify the <code>config/env.ini</code> file.</p><p><code>config/env.ini</code> is divided into three sections, <code>[global]</code> is globally effective, <code>[windows]</code>, <code>[macos]</code>, <code>[linux]</code> are only effective for the corresponding operating system.</p><p>For example, if you need to modify the <code>./configure</code> command for compiling PHP, you can find the <code>SPC_CMD_PREFIX_PHP_CONFIGURE</code> environment variable in the <code>config/env.ini</code> file, and then modify its value.</p><p>If your build conditions are more complex and require multiple <code>env.ini</code> files to switch, we recommend that you use the <code>config/env.custom.ini</code> file. In this way, you can specify your environment variables by writing additional override items without modifying the default <code>config/env.ini</code> file.</p><div class="language-ini vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; This is an example of \`config/env.custom.ini\` file, </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; we modify the \`SPC_CONCURRENCY\` and linux default CFLAGS passing to libs and PHP</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[global]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_CONCURRENCY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=4</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[linux]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_DEFAULT_C_FLAGS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O3&quot;</span></span></code></pre></div><h2 id="library-environment-variables-unix-only" tabindex="-1">Library environment variables (Unix only) <a class="header-anchor" href="#library-environment-variables-unix-only" aria-label="Permalink to &quot;Library environment variables (Unix only)&quot;"></a></h2><p>Starting from 2.2.0, static-php-cli supports custom environment variables for all compilation dependent library commands of macOS, Linux, FreeBSD and other Unix systems.</p><p>In this way, you can adjust the behavior of compiling dependent libraries through environment variables at any time. For example, you can set the optimization parameters for compiling the xxx library through <code>xxx_CFLAGS=-O0</code>.</p><p>Of course, not every library supports the injection of environment variables. We currently provide three wildcard environment variables with the suffixes:</p><ul><li><code>_CFLAGS</code>: CFLAGS for the compiler</li><li><code>_LDFLAGS</code>: LDFLAGS for the linker</li><li><code>_LIBS</code>: LIBS for the linker</li></ul><p>The prefix is the name of the dependent library, and the specific name of the library is subject to <code>lib.json</code>. Among them, the library name with <code>-</code> needs to replace <code>-</code> with <code>_</code>.</p><p>Here is an example of an optimization option that replaces the openssl library compilation:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">openssl_CFLAGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O0&quot;</span></span></code></pre></div><p>The library name uses the same name listed in <code>lib.json</code> and is case-sensitive.</p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>When no relevant environment variables are specified, except for the following variables, the remaining values are empty by default:</p><table tabindex="0"><thead><tr><th>var name</th><th>var default value</th></tr></thead><tbody><tr><td><code>pkg_config_CFLAGS</code></td><td>macOS: <code>$SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion</code>, Other: empty</td></tr><tr><td><code>pkg_config_LDFLAGS</code></td><td>Linux: <code>--static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LDFLAGS</code></td><td>Linux: <code>-static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LIBS</code></td><td>macOS: <code>-liconv</code>, Other: empty</td></tr><tr><td><code>ldap_LDFLAGS</code></td><td><code>-L$BUILD_LIB_PATH</code></td></tr><tr><td><code>openssl_CFLAGS</code></td><td>Linux: <code>$SPC_DEFAULT_C_FLAGS</code>, Other: empty</td></tr><tr><td>others...</td><td>empty</td></tr></tbody></table></div><p>The following table is a list of library names that support customizing the above three variables:</p><table tabindex="0"><thead><tr><th>lib name</th></tr></thead><tbody><tr><td>brotli</td></tr><tr><td>bzip</td></tr><tr><td>curl</td></tr><tr><td>freetype</td></tr><tr><td>gettext</td></tr><tr><td>gmp</td></tr><tr><td>imagemagick</td></tr><tr><td>ldap</td></tr><tr><td>libargon2</td></tr><tr><td>libavif</td></tr><tr><td>libcares</td></tr><tr><td>libevent</td></tr><tr><td>openssl</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>Because adapting custom environment variables to each library is a particularly tedious task, and in most cases you do not need custom environment variables for these libraries, so we currently only support custom environment variables for some libraries.</p><p>If the library you need to customize environment variables is not listed above, you can submit your request through <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">GitHub Issue</a>.</p></div>`,29),o=[s];function r(l,d,c,p,h,m){return t(),i("div",null,o)}const b=e(n,[["render",r]]);export{u as __pageData,b as default};

View File

@ -0,0 +1 @@
import{_ as e,c as i,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),n={name:"en/guide/env-vars.md"},s=a("",29),o=[s];function r(l,d,c,p,h,m){return t(),i("div",null,o)}const b=e(n,[["render",r]]);export{u as __pageData,b as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as t,o as i,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Environment variables","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/env-vars.md","filePath":"en/guide/env-vars.md"}'),n={name:"en/guide/env-vars.md"},s=a("",27),o=[s];function r(l,d,c,p,h,m){return i(),t("div",null,o)}const u=e(n,[["render",r]]);export{b as __pageData,u as default};

View File

@ -0,0 +1 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),r={name:"en/guide/index.md"},n=i('<h1 id="guide" tabindex="-1">Guide <a class="header-anchor" href="#guide" aria-label="Permalink to &quot;Guide&quot;"></a></h1><p>Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.</p><p>In the guide section, you will learn how to use static php cli to build standalone PHP programs.</p><ul><li><a href="./manual-build.html">Build (local)</a></li><li><a href="./action-build.html">Build (GitHub Actions)</a></li><li><a href="./extensions.html">Supported Extensions</a></li></ul><h2 id="compilation-environment" tabindex="-1">Compilation Environment <a class="header-anchor" href="#compilation-environment" aria-label="Permalink to &quot;Compilation Environment&quot;"></a></h2><p>The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>Among them, Linux is currently only tested on Ubuntu, Debian, and Alpine distributions, and other distributions have not been tested, which cannot guarantee successful compilation. For untested distributions, local compilation can be done using methods such as Docker to avoid environmental issues.</p><p>There are two architectures for macOS: <code>x86_64</code> and <code>Arm</code>, but binaries compiled on one architecture cannot be directly used on the other architecture. Rosetta 2 cannot guarantee that programs compiled with <code>Arm</code> architecture can fully run on <code>x86_64</code> environment.</p><p>Windows currently only supports the x86_64 architecture, and does not support 32-bit x86 or arm64 architecture.</p><h2 id="supported-php-version" tabindex="-1">Supported PHP Version <a class="header-anchor" href="#supported-php-version" aria-label="Permalink to &quot;Supported PHP Version&quot;"></a></h2><p>Currently, static php cli supports PHP versions 8.1 to 8.4, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.</p>',12),a=[n];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};

View File

@ -1 +1 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"},r=i("",13),a=[r];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(n,[["render",s]]);export{b as __pageData,_ as default};
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),r={name:"en/guide/index.md"},n=i("",12),a=[n];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(r,[["render",s]]);export{b as __pageData,_ as default};

View File

@ -1 +0,0 @@
import{_ as e,c as t,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Guide","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"},r=i('<h1 id="guide" tabindex="-1">Guide <a class="header-anchor" href="#guide" aria-label="Permalink to &quot;Guide&quot;"></a></h1><p>Static php cli is a tool used to build statically compiled PHP binaries, currently supporting Linux and macOS systems.</p><p>In the guide section, you will learn how to use static php cli to build standalone PHP programs.</p><ul><li><a href="./action-build.html">GitHub Action Build</a></li><li><a href="./manual-build.html">Manual Build</a></li><li><a href="./extensions.html">Supported Extensions</a></li></ul><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>If you are a native English speaker, some corrections to the documentation are welcome.</p></div><h2 id="compilation-environment" tabindex="-1">Compilation Environment <a class="header-anchor" href="#compilation-environment" aria-label="Permalink to &quot;Compilation Environment&quot;"></a></h2><p>The following is the architecture support situation, where ⚙️ represents support for GitHub Action build, 💻 represents support for local manual build, and empty represents temporarily not supported.</p><table tabindex="0"><thead><tr><th></th><th>x86_64</th><th>aarch64</th></tr></thead><tbody><tr><td>macOS</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Linux</td><td>⚙️ 💻</td><td>⚙️ 💻</td></tr><tr><td>Windows</td><td>⚙️ 💻</td><td></td></tr><tr><td>FreeBSD</td><td>💻</td><td>💻</td></tr></tbody></table><p>Among them, Linux is currently only tested on Ubuntu, Debian, and Alpine distributions, and other distributions have not been tested, which cannot guarantee successful compilation. For untested distributions, local compilation can be done using methods such as Docker to avoid environmental issues.</p><p>There are two architectures for macOS: <code>x86_64</code> and <code>Arm</code>, but binaries compiled on one architecture cannot be directly used on the other architecture. Rosetta 2 cannot guarantee that programs compiled with <code>Arm</code> architecture can fully run on <code>x86_64</code> environment.</p><p>Windows currently only supports the x86_64 architecture, and does not support 32-bit x86 or arm64 architecture.</p><h2 id="supported-php-version" tabindex="-1">Supported PHP Version <a class="header-anchor" href="#supported-php-version" aria-label="Permalink to &quot;Supported PHP Version&quot;"></a></h2><p>Currently, static php cli supports PHP versions 8.1 to 8.4, and theoretically supports PHP 8.0 and earlier versions. Simply select the earlier version when downloading. However, due to some extensions and special components that have stopped supporting earlier versions of PHP, static-php-cli will not explicitly support earlier versions. We recommend that you compile the latest PHP version possible for a better experience.</p>',13),a=[r];function s(d,l,c,p,u,h){return o(),t("div",null,a)}const _=e(n,[["render",s]]);export{b as __pageData,_ as default};

View File

@ -1 +1 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a('<h1 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;"></a></h1><p>Various failures may be encountered in the process of using static-php-cli, here will describe how to check the errors by yourself and report Issue.</p><h2 id="download-failure" tabindex="-1">Download Failure <a class="header-anchor" href="#download-failure" aria-label="Permalink to &quot;Download Failure&quot;"></a></h2><p>Problems with downloading resources are one of the most common problems with spc. The main reason is that the addresses used for SPC download resources are generally the official website of the corresponding project or GitHub, etc., and these websites may occasionally go down and block IP addresses. After encountering a download failure, you can try to call the download command multiple times.</p><p>When downloading extensions, you may eventually see errors like <code>curl: (56) The requested URL returned error: 403</code> which are often caused by github rate limiting. You can verify this by adding <code>--debug</code> to the command and will see something like <code>[DEBU] Running command (no output) : curl -sfSL &quot;https://api.github.com/repos/openssl/openssl/releases&quot;</code>.</p><p>To fix this, <a href="https://github.com/settings/tokens" target="_blank" rel="noreferrer">create</a> a personal access token on GitHub and set it as an environment variable <code>GITHUB_TOKEN=&lt;XXX&gt;</code>.</p><p>If you confirm that the address is indeed inaccessible, you can submit an Issue or PR to update the url or download type.</p><h2 id="doctor-can-t-fix-something" tabindex="-1">Doctor Can&#39;t Fix Something <a class="header-anchor" href="#doctor-can-t-fix-something" aria-label="Permalink to &quot;Doctor Can&#39;t Fix Something&quot;"></a></h2><p>In most cases, the doctor module can automatically repair and install missing system environments, but there are also special circumstances where the automatic repair function cannot be used normally.</p><p>Due to system limitations (for example, software such as Visual Studio cannot be automatically installed under Windows), the automatic repair function cannot be used for some projects. When encountering a function that cannot be automatically repaired, if you encounter the words <code>Some check items can not be fixed</code>, it means that it cannot be automatically repaired. Please submit an issue according to the method displayed on the terminal or repair the environment yourself.</p><h2 id="compile-error" tabindex="-1">Compile Error <a class="header-anchor" href="#compile-error" aria-label="Permalink to &quot;Compile Error&quot;"></a></h2><p>When you encounter a compilation error, if the <code>--debug</code> log is not enabled, please enable the debug log first, and then determine the command that reported the error. The error terminal output is very important for fixing compilation errors. When submitting an issue, please upload the last error fragment of the terminal log (or the entire terminal log output), and include the <code>spc</code> command and parameters used.</p>',12),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a('<h1 id="troubleshooting" tabindex="-1">Troubleshooting <a class="header-anchor" href="#troubleshooting" aria-label="Permalink to &quot;Troubleshooting&quot;"></a></h1><p>Various failures may be encountered in the process of using static-php-cli, here will describe how to check the errors by yourself and report Issue.</p><h2 id="download-failure" tabindex="-1">Download Failure <a class="header-anchor" href="#download-failure" aria-label="Permalink to &quot;Download Failure&quot;"></a></h2><p>Problems with downloading resources are one of the most common problems with spc. The main reason is that the addresses used for SPC download resources are generally the official website of the corresponding project or GitHub, etc., and these websites may occasionally go down and block IP addresses. After encountering a download failure, you can try to call the download command multiple times.</p><p>When downloading extensions, you may eventually see errors like <code>curl: (56) The requested URL returned error: 403</code> which are often caused by github rate limiting. You can verify this by adding <code>--debug</code> to the command and will see something like <code>[DEBU] Running command (no output) : curl -sfSL &quot;https://api.github.com/repos/openssl/openssl/releases&quot;</code>.</p><p>To fix this, <a href="https://github.com/settings/tokens" target="_blank" rel="noreferrer">create</a> a personal access token on GitHub and set it as an environment variable <code>GITHUB_TOKEN=&lt;XXX&gt;</code>.</p><p>If you confirm that the address is indeed inaccessible, you can submit an Issue or PR to update the url or download type.</p><h2 id="doctor-can-t-fix-something" tabindex="-1">Doctor Can&#39;t Fix Something <a class="header-anchor" href="#doctor-can-t-fix-something" aria-label="Permalink to &quot;Doctor Can&#39;t Fix Something&quot;"></a></h2><p>In most cases, the doctor module can automatically repair and install missing system environments, but there are also special circumstances where the automatic repair function cannot be used normally.</p><p>Due to system limitations (for example, software such as Visual Studio cannot be automatically installed under Windows), the automatic repair function cannot be used for some projects. When encountering a function that cannot be automatically repaired, if you encounter the words <code>Some check items can not be fixed</code>, it means that it cannot be automatically repaired. Please submit an issue according to the method displayed on the terminal or repair the environment yourself.</p><h2 id="compile-error" tabindex="-1">Compile Error <a class="header-anchor" href="#compile-error" aria-label="Permalink to &quot;Compile Error&quot;"></a></h2><p>When you encounter a compilation error, if the <code>--debug</code> log is not enabled, please enable the debug log first, and then determine the command that reported the error. The error terminal output is very important for fixing compilation errors. When submitting an issue, please upload the last error fragment of the terminal log (or the entire terminal log output), and include the <code>spc</code> command and parameters used.</p><p>If you are rebuilding, please refer to the <a href="./manual-build.html#multiple-builds">Local Build - Multiple Builds</a> section.</p>',13),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};

View File

@ -1 +1 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a("",12),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"Troubleshooting","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/troubleshooting.md","filePath":"en/guide/troubleshooting.md"}'),r={name:"en/guide/troubleshooting.md"},n=a("",13),i=[n];function s(l,c,d,u,h,m){return t(),o("div",null,i)}const f=e(r,[["render",s]]);export{b as __pageData,f as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as i,c as l,o as e,a1 as c}from"./chunks/framework.gjrnbxUT.js";const g=JSON.parse('{"title":"构建 glibc 兼容的 Linux 二进制","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/build-with-glibc.md","filePath":"zh/guide/build-with-glibc.md"}'),s={name:"zh/guide/build-with-glibc.md"},a=c("",23),t=[a];function n(p,o,b,d,h,u){return e(),l("div",null,t)}const k=i(s,[["render",n]]);export{g as __pageData,k as default};

View File

@ -1,6 +1,12 @@
import{_ as t,c as i,o as e,a1 as s}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"环境变量","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/env-vars.md","filePath":"zh/guide/env-vars.md"}'),a={name:"zh/guide/env-vars.md"},d=s(`<h1 id="环境变量" tabindex="-1">环境变量 <a class="header-anchor" href="#环境变量" aria-label="Permalink to &quot;环境变量&quot;"></a></h1><p>本页面的环境变量列表中所提到的所有环境变量都具有默认值,除非另有说明。你可以通过设置这些环境变量来覆盖默认值。</p><h2 id="环境变量列表" tabindex="-1">环境变量列表 <a class="header-anchor" href="#环境变量列表" aria-label="Permalink to &quot;环境变量列表&quot;"></a></h2><p>在 2.3.5 版本之后,我们将环境变量集中到了 <code>config/env.ini</code> 文件中,你可以通过修改这个文件来设置环境变量。</p><p>我们将 static-php-cli 支持的环境变量分为三种:</p><ul><li>全局内部环境变量:在 static-php-cli 启动后即声明,你可以在 static-php-cli 的内部使用 <code>getenv()</code> 来获取他们,也可以在启动 static-php-cli 前覆盖。</li><li>固定环境变量:在 static-php-cli 启动后声明,你仅可使用 <code>getenv()</code> 获取,但无法通过 shell 脚本对其覆盖。</li><li>配置文件环境变量:在 static-php-cli 构建前声明,你可以通过修改 <code>config/env.ini</code> 文件或通过 shell 脚本来设置这些环境变量。</li></ul><p>你可以阅读 <a href="https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini" target="_blank" rel="noreferrer">config/env.ini</a> 中每项参数的注释来了解其作用(仅限英文版)。</p><h2 id="自定义环境变量" tabindex="-1">自定义环境变量 <a class="header-anchor" href="#自定义环境变量" aria-label="Permalink to &quot;自定义环境变量&quot;"></a></h2><p>一般情况下,你不需要修改任何以下环境变量,因为它们已经被设置为最佳值。 但是,如果你有特殊需求,你可以通过设置这些环境变量来满足你的需求(比如你需要调试不同编译参数下的 PHP 性能表现)。</p><p>如需使用自定义环境变量,你可以在终端中使用 <code>export</code> 命令或者在命令前直接设置环境变量,例如:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># export 方式</span></span>
import{_ as i,c as t,o as s,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"环境变量","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/env-vars.md","filePath":"zh/guide/env-vars.md"}'),a={name:"zh/guide/env-vars.md"},n=e(`<h1 id="环境变量" tabindex="-1">环境变量 <a class="header-anchor" href="#环境变量" aria-label="Permalink to &quot;环境变量&quot;"></a></h1><p>本页面的环境变量列表中所提到的所有环境变量都具有默认值,除非另有说明。你可以通过设置这些环境变量来覆盖默认值。</p><h2 id="环境变量列表" tabindex="-1">环境变量列表 <a class="header-anchor" href="#环境变量列表" aria-label="Permalink to &quot;环境变量列表&quot;"></a></h2><p>在 2.3.5 版本之后,我们将环境变量集中到了 <code>config/env.ini</code> 文件中,你可以通过修改这个文件来设置环境变量。</p><p>我们将 static-php-cli 支持的环境变量分为三种:</p><ul><li>全局内部环境变量:在 static-php-cli 启动后即声明,你可以在 static-php-cli 的内部使用 <code>getenv()</code> 来获取他们,也可以在启动 static-php-cli 前覆盖。</li><li>固定环境变量:在 static-php-cli 启动后声明,你仅可使用 <code>getenv()</code> 获取,但无法通过 shell 脚本对其覆盖。</li><li>配置文件环境变量:在 static-php-cli 构建前声明,你可以通过修改 <code>config/env.ini</code> 文件或通过 shell 脚本来设置这些环境变量。</li></ul><p>你可以阅读 <a href="https://github.com/crazywhalecc/static-php-cli/blob/main/config/env.ini" target="_blank" rel="noreferrer">config/env.ini</a> 中每项参数的注释来了解其作用(仅限英文版)。</p><h2 id="自定义环境变量" tabindex="-1">自定义环境变量 <a class="header-anchor" href="#自定义环境变量" aria-label="Permalink to &quot;自定义环境变量&quot;"></a></h2><p>一般情况下,你不需要修改任何以下环境变量,因为它们已经被设置为最佳值。 但是,如果你有特殊需求,你可以通过设置这些环境变量来满足你的需求(比如你需要调试不同编译参数下的 PHP 性能表现)。</p><p>如需使用自定义环境变量,你可以在终端中使用 <code>export</code> 命令或者在命令前直接设置环境变量,例如:</p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># export 方式</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">4</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 直接设置方式</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><p> <code>config/env.ini</code> </p><p><code>config/env.ini</code> <code>[global]</code> <code>[windows]</code><code>[macos]</code><code>[linux]</code> </p><p> PHP <code>./configure</code> <code>config/env.ini</code> <code>SPC_CMD_PREFIX_PHP_CONFIGURE</code> </p><h2 id="--unix-" tabindex="-1"> Unix <a class="header-anchor" href="#--unix-" aria-label="Permalink to &quot; Unix &quot;"></a></h2><p> 2.2.0 static-php-cli macOSLinuxFreeBSD Unix </p><p> <code>xxx_CFLAGS=-O0</code> xxx </p><p></p><ul><li><code>_CFLAGS</code>: C </li><li><code>_LDFLAGS</code>: </li><li><code>_LIBS</code>: </li></ul><p> <code>lib.json</code> <code>-</code> <code>-</code> <code>_</code></p><p> openssl </p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">openssl_CFLAGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O0&quot;</span></span></code></pre></div><p>使 <code>lib.json</code> </p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p></p><table tabindex="0"><thead><tr><th>var name</th><th>var default value</th></tr></thead><tbody><tr><td><code>pkg_config_CFLAGS</code></td><td>macOS: <code>$SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion</code>, Other: empty</td></tr><tr><td><code>pkg_config_LDFLAGS</code></td><td>Linux: <code>--static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LDFLAGS</code></td><td>Linux: <code>-static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LIBS</code></td><td>macOS: <code>-liconv</code>, Other: empty</td></tr><tr><td><code>ldap_LDFLAGS</code></td><td><code>-L$BUILD_LIB_PATH</code></td></tr><tr><td><code>openssl_CFLAGS</code></td><td>Linux: <code>$SPC_DEFAULT_C_FLAGS</code>, Other: empty</td></tr><tr><td>others...</td><td>empty</td></tr></tbody></table></div><p></p><table tabindex="0"><thead><tr><th>lib name</th></tr></thead><tbody><tr><td>brotli</td></tr><tr><td>bzip</td></tr><tr><td>curl</td></tr><tr><td>freetype</td></tr><tr><td>gettext</td></tr><tr><td>gmp</td></tr><tr><td>imagemagick</td></tr><tr><td>ldap</td></tr><tr><td>libargon2</td></tr><tr><td>libavif</td></tr><tr><td>libcares</td></tr><tr><td>libevent</td></tr><tr><td>openssl</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">TIP</p><p></p><p> <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">GitHub Issue</a> </p></div>`,27),c=[d];function l(n,o,p,r,h,k){return e(),i("div",null,c)}const u=t(a,[["render",l]]);export{b as __pageData,u as default};
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_CONCURRENCY</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">4</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> mbstring,pcntl</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span></span></code></pre></div><p> <code>config/env.ini</code> </p><p><code>config/env.ini</code> <code>[global]</code> <code>[windows]</code><code>[macos]</code><code>[linux]</code> </p><p> PHP <code>./configure</code> <code>config/env.ini</code> <code>SPC_CMD_PREFIX_PHP_CONFIGURE</code> </p><p> env.ini 使 <code>config/env.custom.ini</code> <code>config/env.ini</code> </p><div class="language-ini vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ini</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; This is an example of \`config/env.custom.ini\` file, </span></span>
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">; we modify the \`SPC_CONCURRENCY\` and linux default CFLAGS passing to libs and PHP</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[global]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_CONCURRENCY</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=4</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">[linux]</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">SPC_DEFAULT_C_FLAGS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O3&quot;</span></span></code></pre></div><h2 id="--unix-" tabindex="-1"> Unix <a class="header-anchor" href="#--unix-" aria-label="Permalink to &quot; Unix &quot;"></a></h2><p> 2.2.0 static-php-cli macOSLinuxFreeBSD Unix </p><p> <code>xxx_CFLAGS=-O0</code> xxx </p><p></p><ul><li><code>_CFLAGS</code>: C </li><li><code>_LDFLAGS</code>: </li><li><code>_LIBS</code>: </li></ul><p> <code>lib.json</code> <code>-</code> <code>-</code> <code>_</code></p><p> openssl </p><div class="language-shell vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">shell</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">openssl_CFLAGS</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;-O0&quot;</span></span></code></pre></div><p>使 <code>lib.json</code> </p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p></p><table tabindex="0"><thead><tr><th>var name</th><th>var default value</th></tr></thead><tbody><tr><td><code>pkg_config_CFLAGS</code></td><td>macOS: <code>$SPC_DEFAULT_C_FLAGS -Wimplicit-function-declaration -Wno-int-conversion</code>, Other: empty</td></tr><tr><td><code>pkg_config_LDFLAGS</code></td><td>Linux: <code>--static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LDFLAGS</code></td><td>Linux: <code>-static</code>, Other: empty</td></tr><tr><td><code>imagemagick_LIBS</code></td><td>macOS: <code>-liconv</code>, Other: empty</td></tr><tr><td><code>ldap_LDFLAGS</code></td><td><code>-L$BUILD_LIB_PATH</code></td></tr><tr><td><code>openssl_CFLAGS</code></td><td>Linux: <code>$SPC_DEFAULT_C_FLAGS</code>, Other: empty</td></tr><tr><td>others...</td><td>empty</td></tr></tbody></table></div><p></p><table tabindex="0"><thead><tr><th>lib name</th></tr></thead><tbody><tr><td>brotli</td></tr><tr><td>bzip</td></tr><tr><td>curl</td></tr><tr><td>freetype</td></tr><tr><td>gettext</td></tr><tr><td>gmp</td></tr><tr><td>imagemagick</td></tr><tr><td>ldap</td></tr><tr><td>libargon2</td></tr><tr><td>libavif</td></tr><tr><td>libcares</td></tr><tr><td>libevent</td></tr><tr><td>openssl</td></tr></tbody></table><div class="tip custom-block"><p class="custom-block-title">TIP</p><p></p><p> <a href="https://github.com/crazywhalecc/static-php-cli/issues" target="_blank" rel="noreferrer">GitHub Issue</a> </p></div>`,29),d=[n];function l(p,c,o,h,r,k){return s(),t("div",null,d)}const b=i(a,[["render",l]]);export{u as __pageData,b as default};

View File

@ -0,0 +1 @@
import{_ as i,c as t,o as s,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"环境变量","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/env-vars.md","filePath":"zh/guide/env-vars.md"}'),a={name:"zh/guide/env-vars.md"},n=e("",29),d=[n];function l(p,c,o,h,r,k){return s(),t("div",null,d)}const b=i(a,[["render",l]]);export{u as __pageData,b as default};

View File

@ -1 +0,0 @@
import{_ as t,c as i,o as e,a1 as s}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"环境变量","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/env-vars.md","filePath":"zh/guide/env-vars.md"}'),a={name:"zh/guide/env-vars.md"},d=s("",27),c=[d];function l(n,o,p,r,h,k){return e(),i("div",null,c)}const u=t(a,[["render",l]]);export{b as __pageData,u as default};

View File

@ -1 +1 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"故障排除","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/troubleshooting.md","filePath":"zh/guide/troubleshooting.md"}'),r={name:"zh/guide/troubleshooting.md"},s=a('<h1 id="故障排除" tabindex="-1">故障排除 <a class="header-anchor" href="#故障排除" aria-label="Permalink to &quot;故障排除&quot;"></a></h1><p>使用 static-php-cli 过程中可能会碰到各种各样的故障,这里将讲述如何自行查看错误并反馈 Issue。</p><h2 id="下载失败问题" tabindex="-1">下载失败问题 <a class="header-anchor" href="#下载失败问题" aria-label="Permalink to &quot;下载失败问题&quot;"></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/token" 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 &quot;doctor 无法修复&quot;"></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 &quot;编译错误&quot;"></a></h2><p>遇到编译错误时,如果没有开启 <code>--debug</code> 日志,请先开启调试日志,然后确定报错的命令。 报错的终端输出对于修复编译错误非常重要,请在提交 Issue 时一并将终端日志的最后报错片段(或整个终端日志输出)上传,并且包含使用的 <code>spc</code> 命令和参数。</p>',12),c=[s];function d(i,n,u,h,l,p){return t(),o("div",null,c)}const m=e(r,[["render",d]]);export{b as __pageData,m as default};
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"故障排除","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/troubleshooting.md","filePath":"zh/guide/troubleshooting.md"}'),r={name:"zh/guide/troubleshooting.md"},s=a('<h1 id="故障排除" tabindex="-1">故障排除 <a class="header-anchor" href="#故障排除" aria-label="Permalink to &quot;故障排除&quot;"></a></h1><p>使用 static-php-cli 过程中可能会碰到各种各样的故障,这里将讲述如何自行查看错误并反馈 Issue。</p><h2 id="下载失败问题" tabindex="-1">下载失败问题 <a class="header-anchor" href="#下载失败问题" aria-label="Permalink to &quot;下载失败问题&quot;"></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/token" 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 &quot;doctor 无法修复&quot;"></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 &quot;编译错误&quot;"></a></h2><p>遇到编译错误时,如果没有开启 <code>--debug</code> 日志,请先开启调试日志,然后确定报错的命令。 报错的终端输出对于修复编译错误非常重要,请在提交 Issue 时一并将终端日志的最后报错片段(或整个终端日志输出)上传,并且包含使用的 <code>spc</code> 命令和参数。</p><p>如果你是重复构建,请参考 <a href="./manual-build.html#多次构建">本地构建 - 多次构建</a> 章节,清理构建缓存后再次构建。</p>',13),c=[s];function d(i,n,u,h,l,p){return t(),o("div",null,c)}const m=e(r,[["render",d]]);export{b as __pageData,m as default};

View File

@ -1 +1 @@
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"故障排除","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/troubleshooting.md","filePath":"zh/guide/troubleshooting.md"}'),r={name:"zh/guide/troubleshooting.md"},s=a("",12),c=[s];function d(i,n,u,h,l,p){return t(),o("div",null,c)}const m=e(r,[["render",d]]);export{b as __pageData,m as default};
import{_ as e,c as o,o as t,a1 as a}from"./chunks/framework.gjrnbxUT.js";const b=JSON.parse('{"title":"故障排除","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/troubleshooting.md","filePath":"zh/guide/troubleshooting.md"}'),r={name:"zh/guide/troubleshooting.md"},s=a("",13),c=[s];function d(i,n,u,h,l,p){return t(),o("div",null,c)}const m=e(r,[["render",d]]);export{b as __pageData,m as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"zh_guide_troubleshooting.md":"DsBZI1Y4","zh_guide_extensions.md":"CR9s6CxE","zh_guide_index.md":"20ged7P4","deps-map-lib.md":"CHkEUaxl","index.md":"mKXtywCA","en_guide_cli-generator.md":"BiCprQuI","zh_develop_index.md":"-CPpDfMx","zh_develop_doctor-module.md":"DgFAPT6E","zh_develop_system-build-tools.md":"Ds53VEw1","zh_develop_structure.md":"B-0RMSSw","zh_guide_cli-generator.md":"CTAgOo0I","en_contributing_index.md":"CsY8mx8F","en_faq_index.md":"DLWPz-7S","en_guide_deps-map.md":"CqlUBlcY","zh_faq_index.md":"DL8Ncj95","en_develop_structure.md":"BA5PDIse","en_guide_build-on-windows.md":"0XosmiyO","en_guide_extension-notes.md":"BaBSDnpT","zh_index.md":"LslJ1UMp","en_guide_extensions.md":"CNECRpOR","en_guide_index.md":"CjOUKFgy","zh_guide_extension-notes.md":"Bk8p1Uuk","en_guide_action-build.md":"BKamBazh","zh_guide_manual-build.md":"DVwBMluu","en_guide_troubleshooting.md":"9z66WsuC","en_develop_doctor-module.md":"DGd8PeM_","en_guide_env-vars.md":"DXDG6yvH","en_develop_system-build-tools.md":"D6vaAwN3","extensions.md":"BOvD4zE9","en_index.md":"Cbpb4iAg","zh_contributing_index.md":"BvgdahxO","en_develop_index.md":"B7_c9YYa","zh_develop_source-module.md":"D0odLsHX","zh_develop_php-src-changes.md":"Df0-NcBw","zh_guide_build-on-windows.md":"BxVEYT8r","en_guide_manual-build.md":"BmLd-GvS","zh_guide_action-build.md":"DWMlBDvT","en_develop_php-src-changes.md":"DLlooohw","deps-map-ext.md":"CLNwni-7","extension-notes.md":"Bw8xYOie","zh_guide_deps-map.md":"UWX1b51U","zh_guide_env-vars.md":"CfYA93uA","en_develop_source-module.md":"CdOHR0ez"}
{"en_guide_build-with-glibc.md":"DE6DYLuH","zh_guide_cli-generator.md":"CTAgOo0I","en_develop_index.md":"B7_c9YYa","en_guide_cli-generator.md":"BiCprQuI","zh_guide_troubleshooting.md":"DAr4n5J3","en_develop_php-src-changes.md":"DLlooohw","zh_develop_structure.md":"B-0RMSSw","en_develop_source-module.md":"CdOHR0ez","zh_contributing_index.md":"BvgdahxO","en_guide_extension-notes.md":"BaBSDnpT","deps-map-lib.md":"CHkEUaxl","zh_guide_extensions.md":"CR9s6CxE","en_index.md":"Cbpb4iAg","en_guide_action-build.md":"BKamBazh","en_contributing_index.md":"CsY8mx8F","zh_develop_index.md":"-CPpDfMx","zh_guide_action-build.md":"DWMlBDvT","zh_develop_php-src-changes.md":"Df0-NcBw","en_guide_manual-build.md":"BmLd-GvS","extensions.md":"BOvD4zE9","zh_guide_extension-notes.md":"Bk8p1Uuk","zh_develop_system-build-tools.md":"Ds53VEw1","en_guide_deps-map.md":"CqlUBlcY","zh_guide_deps-map.md":"UWX1b51U","en_guide_extensions.md":"CNECRpOR","zh_guide_build-with-glibc.md":"C1xSA12w","en_develop_system-build-tools.md":"D6vaAwN3","en_guide_build-on-windows.md":"0XosmiyO","extension-notes.md":"Bw8xYOie","en_develop_doctor-module.md":"DGd8PeM_","en_develop_structure.md":"BA5PDIse","zh_index.md":"LslJ1UMp","zh_guide_env-vars.md":"C-N0X5FV","zh_guide_build-on-windows.md":"BxVEYT8r","zh_develop_doctor-module.md":"DgFAPT6E","zh_guide_manual-build.md":"DVwBMluu","en_guide_env-vars.md":"CMHjddfB","en_guide_index.md":"BScdGPaV","en_guide_troubleshooting.md":"CTxnPJxK","zh_faq_index.md":"DL8Ncj95","index.md":"mKXtywCA","deps-map-ext.md":"CLNwni-7","zh_develop_source-module.md":"D0odLsHX","zh_guide_index.md":"20ged7P4","en_faq_index.md":"DLWPz-7S"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long