Chocolatey安装ARM_RVCT包失败,寻求技术协助
Looks like the core issue here is that you're trying to use armcc.exe (the ARM compiler itself) as if it's an installer executable—which it's definitely not. Let's break down what's going wrong and fix this step by step.
Why the Install Failed
The error logs tell the whole story:
Error: C3079E: armcc command with no effect
Error: C3065E: type of input file '/S' unknown
armcc.exe is a compiler tool, not an installer. When you ran Install-ChocolateyInstallPackage, it tried to launch armcc.exe with the /S silent install argument—but the compiler interpreted /S as an input file to compile, which doesn't exist. That's why you got those errors and an exit code of 1.
Fixing the Chocolatey Install Script
ARM RVCT (RealView Compilation Tools) is a suite of command-line tools, not a typical "installable" app. Instead of using an installer helper, we need to set up the tools directory and environment variables directly. Here's a revised chocolateyinstall.ps1:
$ErrorActionPreference = 'Stop'; $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" $packageName = 'ARM_RVCT' # 1. If your RVCT files are zipped in the tools folder, unzip them first # Uncomment this line if you included a zip of the RVCT tools in your package: # Install-ChocolateyZipPackage -PackageName $packageName -ZipFile (Join-Path $toolsDir 'rvct-tools.zip') -Destination $toolsDir # 2. Add the RVCT bin directory to the system PATH (adjust 'bin' if your armcc.exe is in a different subfolder) $rvctBinPath = Join-Path $toolsDir 'bin' Install-ChocolateyPath -PathToInstall $rvctBinPath -PathType 'Machine' # 3. Optional: Set a dedicated environment variable for RVCT's root directory Install-ChocolateyEnvironmentVariable -VariableName 'RVCT_ROOT' -VariableValue $toolsDir -VariableType 'Machine' # 4. Verify the installation works Write-Host "Verifying ARM RVCT installation..." try { & armcc.exe --version if ($LASTEXITCODE -eq 0) { Write-Host "✅ ARM RVCT installed and accessible successfully!" } } catch { Write-Warning "⚠️ ARM RVCT verification failed. Double-check your PATH setup." }
Adjust Your Package Structure
- Make sure all RVCT tool files (including
armcc.exe, usually in abinsubfolder) are placed in thetoolsdirectory of your Chocolatey package. If you're distributing them as a zip, add the zip to thetoolsfolder and uncomment the unzip line in the script. - Update your
.nuspecfile to include all necessary files (use<file src="tools/**/*" target="tools" />to include everything in the tools folder).
Test the Fixed Package
- Repack the package with
choco pack - Install it with a fresh install:
choco install arm_rvct -f(the-fflag forces Chocolatey to overwrite any existing files)
内容的提问来源于stack exchange,提问作者DeZLearnsPCs

