macOS High Sierra下安装Particle CLI报错求助:Moved: command not found
Hey there, that error pops up because your curl command isn’t properly following redirects — instead of pulling down the actual Particle CLI install script, it’s grabbing an HTML redirect page, which bash tries to execute as code (hence the "Moved: command not found" message). Let’s fix this step by step:
Fix the curl parameter typo first
The original command uses-sl— the lowercaselis incorrect here. You need to use uppercaseLto tell curl to follow HTTP redirects. Run this corrected command instead:bash <( curl -sL https://particle.io/install-cli )The
-skeeps curl silent (hides unnecessary progress output), and-Lensures it follows any redirects to the real install script — this is the core fix for your current error.If issues persist, download the script locally first
Piping directly to bash can sometimes cause problems with permissions or finicky redirects. Instead, save the script to your machine, make it executable, then run it:# Download the install script to your current directory curl -sL https://particle.io/install-cli > particle-install.sh # Grant executable permissions chmod +x particle-install.sh # Run the installer ./particle-install.shThis lets you verify you’ve downloaded a valid bash script (not an HTML page) before executing it. If the download still pulls HTML, double-check your network connection or try switching networks.
Use sudo for permission errors (if needed)
If the installer complains about lacking write access to system directories, run the local script with sudo:sudo ./particle-install.sh
内容的提问来源于stack exchange,提问作者Ciasto piekarz

