activiti工作流linux系统下流程图中文显示不正常解决
[root@localhost share]# cd /usr/share/fonts
-bash: cd: /usr/share/fonts: No such file or directory
参考 Linux 系统下生成的海报的图片显示不了中文 原来是因为这个啊 新的知识点^_^_tanqingfu1的博客-CSDN博客
参考https://commandnotfound.cn/linux/1/557/fc-list-%E5%91%BD%E4%BB%A4
yum list installed | grep "fontconfig"
https://pkgs.org/download/fontconfig(x86-64)
[root@localhost javasoft]# rpm -ivh fontconfig-2.13.0-4.3.el7.aarch64.rpm
warning: fontconfig-2.13.0-4.3.el7.aarch64.rpm: Header V3 RSA/SHA256 Signature, key ID 305d49d6: NOKEY
dejavu-sans-fonts is needed by fontconfig-2.13.0-4.3.el7.aarch64
fontpackages-filesystem is needed by fontconfig-2.13.0-4.3.el7.aarch64
freetype >= 2.8-7 is needed by fontconfig-2.13.0-4.3.el7.aarch64
ld-linux-aarch64.so.1()(64bit) is needed by fontconfig-2.13.0-4.3.el7.aarch64
ld-linux-aarch64.so.1(GLIBC_2.17)(64bit) is needed by fontconfig-2.13.0-4.3.el7.aarch64
libpthread.so.0(GLIBC_2.17)(64bit) is needed by fontconfig-2.13.0-4.3.el7.aarch64
[root@localhost javasoft]# yum list installed | grep "freetype"
freetype.x86_64 2.4.11-15.el7 @anaconda
我们去找一下fontconfig-2.4.11-15.el7.aarch64.rpm
执行到这里发现有问题,此处不对,我们的x86服务器64位应该是.x86_64.rpm,这个版本刚才下错了
用版本号fontconfig-2.4.11-15.el7.x86_64.rpm去阿里云下载吧,官网下载打不开,网络不好
尝试了阿里云了,此版本找不到那还是使用fontconfig--2.13.0-4.3.el7.x86_64.rpm
[root@localhost javasoft]# rpm -ivh fontconfig-2.13.0-4.3.el7.x86_64.rpm
warning: fontconfig-2.13.0-4.3.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
dejavu-sans-fonts is needed by fontconfig-2.13.0-4.3.el7.x86_64
fontpackages-filesystem is needed by fontconfig-2.13.0-4.3.el7.x86_64
freetype >= 2.8-7 is needed by fontconfig-2.13.0-4.3.el7.x86_64
该提示仍然要求升级freetype版本,因此我们现在先从freetype开始
在此处想了一下找了一下,front的老版本的,发现2的就是2.13的了,那我们就安装这个,不向前找了
[root@localhost front]# rpm -ivh freetype-2.8-14.el7.x86_64.rpm
warning: freetype-2.8-14.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
libpng15.so.15()(64bit) is needed by freetype-2.8-14.el7.x86_64
libpng15.so.15(PNG15_0)(64bit) is needed by freetype-2.8-14.el7.x86_64
[root@localhost front]# rpm -ivh freetype-2.8-14.el7.x86_64.rpm
warning: freetype-2.8-14.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing... ################################# [100%]
file /usr/lib64/libfreetype.so.6 from install of freetype-2.8-14.el7.x86_64 conflicts with file from package freetype-2.4.11-15.el7.x86_64
提示安装冲突和freetype的老版本,此时需要删除 freetype-2.4.11-15.el7.x86_64
此处需要特别注意,安装新版本,一般都是要删除老版本的,但是删除老版本很可能会引发其他问题,所以安装中一定记录清楚,一不小心小心把服务器给装崩溃了,就都得全部重来了
删除参考如下 CentOS rpm卸载_sxj的专栏-CSDN博客_centos rpm卸载
[root@localhost front]# rpm -qa | grep freetype
回到安装freetype-2.8-14.el7.x86_64
[root@localhost front]# rpm -ivh dejavu-sans-fonts-2.37-17.fc35.noarch.rpm
warning: dejavu-sans-fonts-2.37-17.fc35.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 9867c58f: NOKEY
rpmlib(PayloadIsZstd) <= 5.4.18-1 is needed by dejavu-sans-fonts-2.37-17.fc35.noarch
可以参考尝试 CentOS7 和 CentOS8 安装 rusers-server 然后使用LR 实时监控Linux主机性能的办法 - 济南小老虎 - 博客园
但与此同时在 https://pkgs.org/ 我们有查到centos7采用的dejavu-sans-fonts版本是,先尝试一下这个版本,刚才那个版本未必是合适的
[root@localhost front]# rpm -ivh dejavu-sans-fonts-2.33-6.el7.noarch.rpm
warning: dejavu-sans-fonts-2.33-6.el7.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
dejavu-fonts-common = 2.33-6.el7 is needed by dejavu-sans-fonts-2.33-6.el7.noarch
看来安装时本机是centos7的还是要选 el7,下载包的时候要综合阿里云和
然后回到安装 rpm -ivh fontconfig-2.13.0-4.3.el7.x86_64.rpm
从目录可以看出多出了dejavu目录,看来上边没有见到fonts,是没有安装dejavu
[root@localhost front]# mkfontscale
-bash: mkfontscale: command not found
此处参考Linux(Ubuntu,Cent OS)环境安装mkfontscale mkfontdir命令以及中文字库_soulmate_P的博客-CSDN博客_linux mkfontscale
由于本机可能已存在依赖的相关版本,本次不下载该连接提供的包(这个包由于版本问题很可能不能用)
1.libfontenc-1.1.3-3.amzn2.0.2.x86_64.rpm
2.libXfont-1.5.2-1.amzn2.0.2.x86_64.rpm
3.xorg-x11-font-utils-7.5-20.amzn2.0.2.x86_64.rpm
4.fontpackages-filesystem-1.44-8.amzn2.noarch.rpm
5.stix-fonts-1.1.0-5.amzn2.noarch.rpm
6.fontconfig-2.10.95-11.amzn2.0.2.x86_64.rpm
[root@localhost front]# yum list installed | grep "libfontenc"
[root@localhost front]# yum list installed | grep "libXfont"
[root@localhost front]# yum list installed | grep "xorg"
[root@localhost front]# yum list installed | grep "fontpackages"
fontpackages-filesystem.noarch 1.44-8.el7 installed
[root@localhost front]# yum list installed | grep "stix"
[root@localhost front]# yum list installed | grep "fontconfig"
fontconfig.x86_64 2.13.0-4.3.el7 installed
在上一步安装fontconfig的时候fontpackages-filesystem和fontconfig我们已经安装过了
同时在阿里云和https://pkgs.org/search/?q=mkfontscale也查了一下,只在阿里云里找到了这个
回到上一个教程,Linux(Ubuntu,Cent OS)环境安装mkfontscale mkfontdir命令以及中文字库_soulmate_P的博客-CSDN博客_linux mkfontscale
使用 https://pkgs.org/search/?q=libfontenc 看起来好一点,直接会提示centos使用那个