不久前,我在我的电脑上发布了关于奇怪活动的信息。从那以后,我确实发现了一些似乎指向fontconfig和朋友(fc-cache)的新症状。我认为这足以提出一个新的问题。
虽然我还没有直接的证据,但我注意到安装操作系统的/-分区正在缓慢地填满。当然,我首先检查了可能的嫌疑人,例如S日志文件、/tmp残留物等。然而,老的可靠的xdiskusage向我指出了一个巨大的/var/cache/fontconfig目录(我的意思是巨型目录)。数以万计的条目,有些条目可以追溯到6个月前)。该目录占用了磁盘空间的GBs (尽管每个文件只有120字节长)。
经过敏化,我定期检查文件数量,发现它不断增加,甚至在正常使用期间也是如此(我以为fc-cache只在启动时或文件在字体目录中更改时运行)。
所以我运行了fc-cache -r -v。(-r按照man的说法应该是清理):
删除所有现有的缓存文件并重新扫描
得到了以下报告:
/usr/share/fonts/OTF: caching, new cache contents: 78 fonts, 0 dirs
/usr/share/fonts/TTF: caching, new cache contents: 544 fonts, 0 dirs
/usr/share/fonts/Type1: caching, new cache contents: 115 fonts, 0 dirs
/usr/share/fonts/Speedo: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/Speedo: failed to write cache
/usr/share/fonts/cyrillic: caching, new cache contents: 0 fonts, 0 dirs
/usr/share/fonts/cyrillic: failed to write cache
/usr/share/fonts/misc: caching, new cache contents: 125 fonts, 0 dirs
/root/.local/share/fonts: skipping, no such directory
/root/.fonts: caching, new cache contents: 0 fonts, 1 dirs
/root/.fonts/Library: caching, new cache contents: 0 fonts, 0 dirs
/root/.fonts/Library: failed to write cache
/usr/local/share/fonts: caching, new cache contents: 0 fonts, 3 dirs
/usr/local/share/fonts/m: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/p: caching, new cache contents: 1 fonts, 0 dirs
/usr/local/share/fonts/t: caching, new cache contents: 1 fonts, 0 dirs
/root/.fonts/Library: skipping, looped directory detected
/usr/local/share/fonts/m: skipping, looped directory detected
/usr/local/share/fonts/p: skipping, looped directory detected
/usr/local/share/fonts/t: skipping, looped directory detected
/var/cache/fontconfig: cleaning cache directory
/var/cache/fontconfig: invalid cache file: R-le64.cache-7
/var/cache/fontconfig: invalid cache file: 523f903ec8d4564459770c546e0d49d6-le64.cache-7
/root/.cache/fontconfig: not cleaning non-existent cache directory
/root/.fontconfig: not cleaning non-existent cache directory
fc-cache: failed我找不到答案的问题:
fc-cache运行?(我注意到,启动更大的程序,如GIMP或mplayer,似乎会在缓存目录中创建许多新条目。有关该活动的更多信息,请参见顶部的链接)UPDATE仍然很混乱,但是我安装了fontconfig 2.13.91 (而不是2.13.1),并且完全清空了/var/cache/config目录。在X内部正常工作期间,缓存目录中不会产生更多繁重的活动或额外的文件。此外,fc-缓存现在报告它成功了。
不过:
rmdir和mkdir正确引导系统之后.发布于 2023-01-27 18:36:26
也许是个肮脏的解决方案,但它帮助了我:
我首先删除了fontconfig缓存文件夹,而不是重新安装fontconfig包,最后重新启动。
我没有花哨的字体在我的系统上,我不明白为什么缓存增长超过1GB。在一台368 On的小型笔记本电脑上,这似乎不合适。
https://unix.stackexchange.com/questions/545750
复制相似问题