John Behan - Senior Software Developer

John Behan

Senior Software Developer & Mentor

The Easy WayTM to Install Rust (on a Mac)

The easiest way to install Rust on a Mac is to head on over to https://www.rust-lang.org/tools/install and use the shell command there -

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

But…

Sometimes we get the following error -

Unknown SSL protocol error in connection to static.rust-lang.org

Sometimes. I got this on my work machine but not my personal one.

You can read a bit about this issue here - https://www.wormly.com/answers/sid/142/topicid/19

There is a fairly straightforward solution

The Fairly Easy WayTM to Install Rust (on a Mac)

(See Update below before trying this)

We want to use rustup so let's get that first.

brew install rustup

Next let's setup cargo and rustc,

rustup-init

Finally we can check our installation with - rustc --version

UPDATE

jeikabu on Dev.to has given this tip to try.

The old way of installing rustup - curl sh.rustup.rs -sSf | sh

I haven't tested this but it is worth trying before falling back on brew.