emacs - 启动带有 nix 的 emacs 时出现 Fontconfig 错误

标签 emacs nix fontconfig

我正在使用 Ubuntu 19.10。我有 nix 版本 2.3.1。我使用以下方法安装了 emacs 26.3:

nix-env -iA nixpkgs.emacs

当我启动 emacs 时,我收到以下错误消息:
(process:9100): Gtk-WARNING **: 09:41:39.668: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: 09:41:39.756: Failed to load module "canberra-gtk-module"
Gtk-Message: 09:41:39.756: Failed to load module "canberra-gtk-module"
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 error: Cannot load config file from /etc/fonts/fonts.conf

有没有办法解决这个问题?

最佳答案

这里的问题是 nixpkgs 中的 Emacs 是针对比 Ubuntu (2.13.1) 附带的稍旧版本的 fontconfig (2.12.6) 构建的。但是,Emacs 的 fontconfig 2.12.6 尝试读取 /etc/fonts/fonts.conf由主机系统的 fontconfig 2.13.1 安装。与此同时,一些旧版本不理解的附加字段已添加到配置中。
在我的系统上,我只是从 /etc/fonts/fonts.conf 中删除了违规行并且尚未经历任何不利影响。

关于emacs - 启动带有 nix 的 emacs 时出现 Fontconfig 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59600351/

相关文章:

尼克斯环境 : understading available attribute paths in the active Nix expression

python - 在基于 Debian 的系统上,如何找到一种字体具有字形的 Unicode 代码点?

linux - CentOS 和 fontconfig : Cannot load default config file

emacs - elisp中如何确定操作系统?

nix - 如何在商店中找到派生路径,从编译后的包路径开始?

dockerTools.buildImage删除了fromImage镜像的环境变量,如何保留Env?

c - fontconfig 库中的 FcFini 有什么意义?

macos - "Edit in Emacs..."OSX 输入管理器

r - 是否可以在类似于术语模式的 emacs 中使用 R?

emacs - Slime 在我的 Clojure repl 中抛出 "Variable binding depth exceeds max-specpdl-size"