Title: Solana: Failed to Install Platform-Tools Due to HTTP Status Client Error (404 Not Found)
Introduction
When running the cargo build-sbf --force-tools-install
command on a Mac, Solana had an encounter an issue installing platform-tools. This article will explain the problem and provide steps to solve it.
Problem Description
The error message HTTP status client error (404 Not Found)
indicates that the platform-tools are not available on the HTTP server. Platform-tools are essential for building and testing Solana applications, but they may not be installed or up-to-date.
Solution
To fix this issue, follow these steps:
- Check the Solana Webpack CLI version: Make sure you’re running the latest version of the Solana Webpack CLI (SWC). You can check by running the following command in your terminal:
swc --version
- Verify the
SWC
installation: If the previous step doesn’t work, try verifying the installation of SWC using the following command:
swc --install
- Update SWC to the latest version: Update SWC to the latest version by running:
curl -sS | tar xvf --strip-components 1
- Reinstall SWC: Run the following command to reinstall SWC:
./bin/solana-webpack-cli install -f
- Check the
SWC
installation again: Verify that the platform-tools are installed and up-to-date by running:
swc --version
Troubleshooting Tips
- If you’re using a different package manager (e.g., Homebrew), ensure it’s not interfering with the SWC installation.
- Check for any conflicts or dependencies between Solana and other packages that may be preventing the platform-tools from installing.
By following these steps, you should be able to resolve the issue of failed cargo build-sbf
command when trying to install platform-tools on a Mac.