I was trying to reinstall rust due to an issue relating to cargo not being able to access the package index, but when I came back to reinstall it, I got this error:
user@comuter downloads % curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
/var/folders/sv/cfwtdbss7vs_wnghz4_scjd40000gt/T/tmp.gHo7RtjC/rustup-init: line 2: syntax error near unexpected token `newline'
/var/folders/sv/cfwtdbss7vs_wnghz4_scjd40000gt/T/tmp.gHo7RtjC/rustup-init: line 2: `<!DOCTYPE html>'
user@comuter downloads % rustup-init -v -y
info: profile set to 'default'
info: default host triple is x86_64-apple-darwin
verbose: installing toolchain 'stable-x86_64-apple-darwin'
verbose: toolchain directory: '/Users/trenten_miller/.rustup/toolchains/stable-x86_64-apple-darwin'
info: syncing channel updates for 'stable-x86_64-apple-darwin'
verbose: creating temp file: /Users/trenten_miller/.rustup/tmp/_g2oia8imf_js606_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/trenten_miller/.rustup/tmp/_g2oia8imf_js606_file
verbose: no update hash at: '/Users/trenten_miller/.rustup/update-hashes/stable-x86_64-apple-darwin'
verbose: creating temp file: /Users/trenten_miller/.rustup/tmp/xa31testt2ge_l7p_file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/trenten_miller/.rustup/tmp/xa31testt2ge_l7p_file.toml
info: update not yet available, sorry! try again later
verbose: toolchain is already up to date
error: toolchain 'stable-x86_64-apple-darwin' is not installable
user@comuter downloads % rustup-init -V
rustup-init 1.26.0 (5af9b9484 2023-04-05)
user@comuter downloads %
What went wrong? How can I complete the install?
UPDATE: Found a way to cause the instillation to succeed! Here is the command logs:
user@computer Downloads % ./rustup-init --no-update-default-toolchain -v -y
info: profile set to 'default'
info: default host triple is x86_64-apple-darwin
info: updating existing rustup installation - leaving toolchains alone
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, run:
source "$HOME/.cargo/env"
user@computer Downloads % source "$HOME/.cargo/env"
user@computer Downloads % rustc -V
error: rustup could not choose a version of rustc to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
user@computer Downloads % rustup -v default stable
verbose: read metadata version: '12'
verbose: looking for installed toolchain 'stable-x86_64-apple-darwin'
verbose: installing toolchain 'stable-x86_64-apple-darwin'
verbose: toolchain directory: '/Users/trenten_miller/.rustup/toolchains/stable-x86_64-apple-darwin'
info: syncing channel updates for 'stable-x86_64-apple-darwin'
verbose: creating temp file: /Users/trenten_miller/.rustup/tmp/yrn875xdnhwo_5r7_file
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/trenten_miller/.rustup/tmp/yrn875xdnhwo_5r7_file
verbose: no update hash at: '/Users/trenten_miller/.rustup/update-hashes/stable-x86_64-apple-darwin'
verbose: creating temp file: /Users/trenten_miller/.rustup/tmp/07fdnb7pwd6fykfv_file.toml
verbose: downloading file from: 'https://static.rust-lang.org/dist/channel-rust-stable.toml'
verbose: downloading with reqwest
verbose: deleted temp file: /Users/trenten_miller/.rustup/tmp/07fdnb7pwd6fykfv_file.toml
info: update not yet available, sorry! try again later
verbose: toolchain is already up to date
error: toolchain 'stable-x86_64-apple-darwin' is not installable
This is as far as I can go. Any thang that I can do to make this work?