1.查看debian的发行版本信息

cat /etc/os-release

2.更换apt-get的源:

修改源配置:

vim /etc/apt/sources.list

根据debian的版本在配置中加入合适的阿里源(也可选择其他源):

deb http://mirrors.ustc.edu.cn/debian buster main contrib non-free

deb http://mirrors.ustc.edu.cn/debian buster-backports main contrib non-free

deb http://mirrors.ustc.edu.cn/debian buster-proposed-updates main contrib non-free

deb http://mirrors.ustc.edu.cn/debian-security buster/updates main contrib non-free

退出后更新源:

apt-get clean

apt-get update

apt-get upgrade

3.安装字体:

apt-get install ttf-mscorefonts-installer

apt-get install fontconfig

4.在/usr/share/fonts/truetype/目录下新建文件夹myfonts,将*.ttf文件复制到此文件夹下,并修改字体文件的权限:

chmod 777 *.ttf

5.建立字体缓存

mkfontscale

mkfontdir

fc-cache -fv

fc-list

6.添加中文支持

安装locale:

apt-get install locales

配置:

dpkg-reconfigure locales

选择以下编码并将zh_CN UTF-8 UTF-8设置为默认编码:

en_US ISO-8859-1

en_US.UTF8 UTF-8

zh_CN GB2312

zh_CN.GB18030 GB18030

zh_CN GBK GBK

zh_CN UTF-8 UTF-8

7.安装中文字库

apt-get install ttf-wqy-zenhei

8.重启系统

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐