DEBIAN 12安装中文包
安装debian12的时候,因为是服务器,所以没有选择多国语言
最近要ssh到服务器上grep一些中文,发现字符间距过宽
用vim打开也乱码
在网上找了一些网页都不好用,更难受的是apt update也不行
下面是全部的步骤,具体是什么原因懒得去找了
- 解决apt update的问题
sudo apt install apt-transport-https
- 修改软件源为中科大
# sudo vi /etc/apt/sources.list
deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
- 安装多语言包
sudo apt update
sudo apt-get install locales
sudo apt install locales-all
dpkg-reconfigure locales
选择zh_CN.UTF-8,并置为默认
礼毕,平身