系统在运行一些程序时出现了fontconfig error的问题,经排查在python的matplot语句运行时会报这类错,虽然对结果没有什么影响,但这一堆报错不是强迫症看着都难受
于此同时,发现启动gedit时也会报此类错误
网上查找该类错误,发现这是一个悬而未决的问题,有帖子讨论过此问题,但并没有找到解决方案。

wangyihu2020@wangyihu2020-LEGION-REN7000K-26IOB:~$ gedit test
Fontconfig warning: "/etc/fonts/fonts.conf", line 5: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/fonts.conf", line 6: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/fonts.conf", line 6: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/fonts.conf", line 7: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/fonts.conf", line 9: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/10-hinting-slight.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/10-hinting-slight.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/20-unhint-small-vera.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/25-unhint-nonlatin.conf", line 8: unknown element "description"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 4: unknown element "its:rules"
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: unknown element "its:translateRule"
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: invalid attribute 'translate'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 5: invalid attribute 'selector'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 6: invalid attribute 'xmlns:its'
Fontconfig error: "/etc/fonts/conf.d/30-metric-aliases.conf", line 6: invalid attribute 'version'
Fontconfig warning: "/etc/fonts/conf.d/30-metric-aliases.conf", line 8: unknown element "description"
.....

从错误信息看,应该是调包时候不认识一些固定的代码格式,那么问题可能出在版本不匹配上
故猜想gedit及一些代码运行环境中调的fontconfig包与系统fontconfig包版本不一致

通过在根目录搜索libfontconfig包,找到了libfontconfig.so.1, libfontconfig.so.1.10.1, libfontconfig.so.1.12.1等文件,而且数目很多,经过观察他们分属于不同的软件环境中,即许多软件在调用时会调用自己的libfontconfig库

第一个想法是用.so.1.12.0替换.so.10.1,但试了好几个名为.so.12.0的文件,都有不同的报错。

突然想起来fontconfig库每个ubuntu系统都是有的,但只有本人报这类错,于是乎比较了同事主机上的该库文件与本人主机上的该库,发现文件有细微不同
如下:


图上看,确实是本人主机上的文件多了几行,而这几行正是报错信息提示的一些tag,仔细看了下这句里有个网址,点进去是w3c官网的ITS标准,原来本人主机此库的代码多包含的几行为ITS版本信息,属于开发者添加的描述信息,而这些描述信息不能被旧的libfontconfig.so.1.10.1正确识别,故报错。但由于描述信息不影响正常信息,所以运行结果除了一堆报错外没有其它问题。
故解决方案很简单,同事电脑上的库文件是没有问题的,把/etc/fonts/用upan拷过来替换就完事了hhh

这次调fontconfig库用了一天多,经历了卸载fontconfig库时把桌面卸掉、修改了fonts.conf文件某几行导致系统全部乱码等问题,在重装系统的边缘反复横跳~

这一坨报错虽然没有任何不良影响,但如果初学者遇到了还是挺搞心态的,写此文记录此类报错对系统没有影响之说明及解决方案。
相关帖:https://bbs.archlinux.org/viewtopic.php?id=235643

linux fontconfig字体报错问题相关推荐

  1. Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案

    Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案 参考文章: (1)Linux安装Apache报错:Can ...

  2. linux 启动rabbitmq 报错:

    linux 启动rabbitmq 报错: Job for rabbitmq-server.service failed because the control process exited with ...

  3. Linux Lernel Panic 报错解决思路

    Linux Kernel Panic 报错解决思路 作为系统管理员面对server重启都起不来,那是一个相当烦躁,接显示器查看经常会碰到遇到这样的字眼"Kernel Panic" ...

  4. 在Linux执行命令报错”Arg list too long”的原因分析

    http://www.yunweipai.com/archives/558.html 在Linux执行命令报错"Arg list too long"的原因分析 吞拿鱼手卷 于 3 ...

  5. linux 编译报错 not a directory,Linux常见英文报错中文翻译

    Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...

  6. Linux常见英文报错中文翻译(菜鸟必知)

    Linux常见英文报错中文翻译(菜鸟必知) 1.command not found 命令没有找到 2.No such file or directory 没有这个文件或目录 3.Permission ...

  7. 【报错解决】linux网络编程报错storage size of ‘serv_addr’ isn’t known解决办法

    linux网络编程报错storage size of 'serv_addr' isn't known解决办法 报错如下: server.c:18:21: error: storage size of ...

  8. linux mysql 登录报1045_【mysql】linux登录MySQL_报错ERROR_1045_(28000)解决办法

    [mysql]linux登录MySQL_报错ERROR_1045_(28000)解决办法 5年前 (2015-09-17)    作者:Jiaozn    分类:MySQL    阅读次数:1852 ...

  9. linux执行sudo报错【/etc/sudo.conf is owned by uid 994, should be 0】

    linux执行sudo报错[/etc/sudo.conf is owned by uid 994, should be 0] 错误描述 如下图: 案例一 案例二 解决办法: 执行命令 pkexec c ...

最新文章

  1. Ajax 中XmlHttp 乱码 的解决方法 (UTF8,GB2312 编码 解码)
  2. [翻译]ASP.NET AJAX与SharePoint的集成
  3. 利用服务器修改服务器数据,用Jquery实现可编辑表格并用AJAX提交到服务器修改数据...
  4. uniapp启动页,底部虚拟按钮向上闪一下的问题
  5. rand--创建均匀分布随机矩阵
  6. 硬件:笔记本常见故障处理技巧与思路,值得收藏!
  7. 使用Python打造一款间谍程序
  8. lua mysql 字符串截取_Lua 截取字符串(截取utf-8格式字符串)
  9. python多态_python 多继承及多态
  10. 抖音快手微视去水印小程序!全网短视频无水印免费下载工具!
  11. 开源软件、自由软件及免费软件的区别
  12. RTF 文件格式解析
  13. 举办2021创业者线下沙龙心得与感悟
  14. Transaction使用及原理
  15. 计算机与科学技术会学机械,计算机科学与技术和机械设计制造及其自动化的区别...
  16. 手把手教你处理单张百度热力图
  17. 用python做小黑屋的游戏
  18. 利用osg::ClipPlane 对节点进行多边形裁切
  19. 我们分析了400位华语歌手的歌词,发现人们重点关注的人事物情
  20. Windows下对游戏杆编程

热门文章

  1. grep 忽略大小写、忽略grep命令本身
  2. python 列表作业
  3. 用Java写了一个简单的控制台狼人杀游戏
  4. 地质勘查项目管理困难重重,需要专业软件来解决
  5. [自动驾驶]高德的高精度地图
  6. 2021-10-13爬虫requests总结
  7. 《SQL基础》04. SQL-DQL
  8. Android谷歌地图地理编码,谷歌地图API地理编码多个地点
  9. Mac使用Homebrew极速安装启动RabbitMQ一把梭
  10. 个人职业生涯规划发展的一些图