MacOS Mojave环境下无法安装Spin CLI(Spinnaker)求助
Looks like you ran into two key issues with the installation command:
- You used the Linux-specific download path (
linux/amd64) instead of the macOS-compatible one (darwin/amd64). - A shell parsing quirk in the nested curl command caused an invalid path (note the extra
)in your error message:latest)/darwin/amd64/spin).
Here are a few reliable fixes to get Spin CLI installed:
Option 1: Manual Version-Specific Download (Most Reliable)
First, grab the latest Spin CLI version number directly:
curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest
This will return a version string like v1.29.0. Use that version in the macOS-specific download command:
curl -LO https://storage.googleapis.com/spinnaker-artifacts/spin/[YOUR_VERSION]/darwin/amd64/spin
Replace [YOUR_VERSION] with the number you retrieved (e.g., v1.29.0).
Option 2: Fix the Nested Curl Command
Adjust the original command to target macOS and wrap the URL in quotes to avoid parsing errors:
curl -LO "https://storage.googleapis.com/spinnaker-artifacts/spin/$(curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest)/darwin/amd64/spin"
The quotes prevent unexpected shell parsing that caused the extra ) in your error.
Option 3: Use Homebrew (Simpler, if You Have Homebrew Installed)
If you use Homebrew, install the Spin CLI with official taps for automatic setup:
brew tap spinnaker/tap brew install spinnaker/tap/spin
This handles download, executable permissions, and PATH configuration automatically.
Post-Install Steps (For Options 1 & 2)
After downloading, make the binary executable and move it to a directory in your PATH:
chmod +x spin mv spin /usr/local/bin/
Verify the installation works by running:
spin --version
内容的提问来源于stack exchange,提问作者LiranC

