WRITELOOP

INSTALL LAST CARGO VERSION ON UBUNTU

I discovered 'television', which is a CLI tool written in rust that provides a fast general purpose fuzzy finder I can use on my terminal. I want also to use it on the (K)VM I use to develop on, which has Ubuntu 22.04 as the operating system. And I was not able to do it there with cargo installed from the apt repository because it was too old. This is how I was able to do that.

2024 November 21

Install last cargo version on Ubuntu

My (K)VM is using Ubuntu 22.04, which is not even the latest Ubuntu version.

So first I had to delete cargo which was installed through apt:


sudo apt remove cargo
sudo apt autoremove

Then, I searched a little bit and discovered the default tool to install rust-related tooling (including cargo) is rustup. So, I installed it:


sudo snap install rustup --classic
rustup default stable  # this bootstraps the rust tooling (cargo, rustc, etc...)

To validate it was installed and working, I ran:


rustc --version
cargo --version

Then, I was able to install television:


cargo install television