How To Install rust-std-static on CentOS 8

rust-std-static is Standard library for Rust

Introduction

In this tutorial we learn how to install rust-std-static on CentOS 8.

What is rust-std-static

This package includes the standard libraries for building applications written in Rust.

We can use yum or dnf to install rust-std-static on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install rust-std-static.

Install rust-std-static on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install rust-std-static using dnf by running the following command:

sudo dnf -y install rust-std-static

Install rust-std-static on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install rust-std-static using yum by running the following command:

sudo yum -y install rust-std-static

How To Uninstall rust-std-static on CentOS 8

To uninstall only the rust-std-static package we can use the following command:

sudo dnf remove rust-std-static

rust-std-static Package Contents on CentOS 8

/usr/lib/rustlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-ab8dbaac4c0d7732.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-b45fa80c9f820131.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-dc5b96fd3f726f98.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-e8489c1f15fbb688.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-f3b7d6167c6144e8.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-fa27894a72ccaffb.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-a4181e3fc73065f2.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-0e3889b6eeaee63a.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-2ed3659cb2b192e7.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-fef34517006e769f.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-584fcc78417f28df.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-b2f6e937b6e750dc.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_abort-7541574a84f193be.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-461b3fa1efa6d7f1.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libproc_macro-3793ae7bb43ef97a.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-9fecffcc835d0557.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-ea332f4c2861957c.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-16106dedcf2b37fb.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_std-15e7227797e02896.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-298e90ecb364dd7e.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-b40271cebce2a007.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-8ff28a13152e87d7.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunicode_width-6631d5ce135c905e.rlib
/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-fe758eab1fa21a1e.rlib

References

Summary

In this tutorial we learn how to install rust-std-static on CentOS 8 using yum and dnf.