Ubuntu 提示:/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

出现此警告的原因是 Ubuntu Server 无法理解 en_US.UTF-8 这个字符集,要解决这个问题,就要在服务器上重新生成 en_US.UTF-8 字符集
Failed to set locale, defaulting to C.UTF-8

某个服务器有一段时间没有登录了,该服务器的操作系统是 Rocky Linux 9.3。今天想起来需要进入这个服务器进行一些操作,然而执行命令的时候,系统提示“Failed to set locale, defaulting to C.UTF-8”