Windows11安装Platform.sh CLI遇MINGW64不支持错误的解决办法
解决Platform.sh CLI在MINGW64环境不支持的问题
方法1:通过Chocolatey包管理器安装
- 以管理员身份打开PowerShell,执行以下命令安装Chocolatey:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - 安装完成后,执行命令安装Platform.sh CLI:
choco install platformsh-cli -y
方法2:手动安装预编译二进制文件
- 找到Platform.sh CLI官方发布的Windows 64位预编译二进制包(zip格式)
- 解压包后,将其中的
platform.exe文件移动到系统环境变量PATH包含的目录(比如C:\Windows\System32) - 打开新的终端(PowerShell或CMD),运行
platform --version验证安装成功
方法3:使用WSL2环境安装
- 以管理员身份打开PowerShell,执行命令启用并安装WSL2:
wsl --install - 安装完成后启动Linux发行版(默认是Ubuntu),在Linux终端中执行你原本的安装命令:
curl -fsSL https://raw.githubusercontent.com/platformsh/cli/main/installer.sh | bash
内容的提问来源于stack exchange,提问作者Shayan Pakrad
相关产品推荐
相关产品推荐

