Hello, friends. In this post, you will learn how to install Rust on CentOS 9 Stream. This is one of the most popular programming languages in the world.
Rust is an Open-Source and multipurpose programming language that was initially created by Mozilla, but has gradually gained much popularity worldwide.
Fans of this language say that it is possible that in time it could be a very solid alternative to C or C++ if it is not already.
That is why Rust has become the target of many apprentices and mature developers who see it as a solution to their problems.
Install Rust on CentOS 9 Stream
Before we start installing Rust, it is a good idea to first upgrade the system
sudo dnf update
Next, we need to install some packages necessary for a successful installation.
sudo dnf install cmake gcc make curl clang
Next we need to enable the EPEL repository, which will give us access to more packages needed by Rust.
sudo dnf install epel-release
Now we can download the Rust installation and configuration script using this command
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
This command not only downloads the script, but also executes it automatically, starting the language installation. Just press 1 to accept the installation.
At the end of the installation, it is enough to refresh the Rust environment so that we can use the commands without issues.
source ~/.profile
source ~/.cargo/env
Finally, verify the installed version with the following command
rustc -V
You will get an output screen like this
rustc 1.61.0 (fe5b13d68 2022-05-18)
Conclusion
In this post, you learned how to install Rust on CentOS 9 Stream. This allows you to use a modern programming language for your applications.
Thanks for reading.