FreeCAD 抱怨打不开 XercesMessages_en_US.cat

今天运行 FreeCAD,报了下面这个错误:

Could not open catalog:
 XercesMessages_en_US.cat
 or XercesMessages_en_US.cat
Cannot load message domain

不明觉厉,昨天还好好的。也许是因为我升级编译了 FreeCAD,也许是我更新了 Gentoo 的某些包所致。这个错误让我纠结了好大一会,最后才想起来用 strace 查看一下更细致的原因,结果看到:

open("/usr/share/locale/C/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/LC_MESSAGES/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/LC_MESSAGES/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/LC_MESSAGES/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/C/LC_MESSAGES/XercesMessages_en_US.cat", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "Could not open catalog:\n", 24Could not open catalog:

这个 XercesMessages_en_US.cat 是 xerces-c 软件包中的,具体的作用尚未关注,它目前位于  /usr/share/xerces-c/msg 目录。

既然如此,那么就在 /usr/share/locale 中建立一个名为“C”的链接,指向 /usr/share/xerces-c/msg 目录即可。

然后,FreeCAD 就可以成功运行了。

然后,就没有然后了。