Pango-warning

当我用sudo命令开启emacs后,会异常卡顿,而且过一会就崩溃。但是我之用emacs命令打开就没问题。前几天还能好好用的。错误信息: (emacs:25070): Pango-WARNING **: 21:45:17.502: failed to create cairo scaled font, expect ugly output. the offending font is ‘IPAexGothic 11’ (emacs:25070): Pango-WARNING **: 21:45:17.464: font_face status is: (emacs:25070): GdkPixbuf-WARNING **: 21:45:17.499: Error loading XPM image loader: Unable to load image-loading module: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so: /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.so: cannot open shared object file: Too many open files (emacs:25070): Pango-WARNING **: 21:45:17.502: scaled_font status is: out of memory

错误似乎是由什么字体引起的?可是为什么不用sudo就没问题呢?

而且emacs会变成这样。

原因出在这里,你的 root 用户开了太多文件超过系统限制数量了。

lsof -u root 看那些程序开了文件。

1 个赞

systemd 1 root cwd unknown /proc/1/cwd (readlink: Permission denied)
systemd 1 root rtd unknown /proc/1/root (readlink: Permission denied)
systemd 1 root txt unknown /proc/1/exe (readlink: Permission denied)
ystemd 1 root NOFD /proc/1/fd (opendir: Permission denied)
threadd 2 root cwd unknown /proc/2/cwd (readlink: Permission
denied)
kthreadd 2 root rtd unknown /proc/2/root (readlink: Permission denied)
kthreadd 2 root txt unknown /proc/2/exe (readlink: Permission denied)
kthreadd 2 root NOFD /proc/2/fd (opendir: Permission denied)
kworker/0 4 root cwd unknown /proc/4/cwd (readlink: Permission denied) kworker/0 4 root rtd unknown /proc/4/root (readlink: Permission denied)
kworker/0 4 root txt unknown /proc/4/exe (readlink: Permission denied)
kworker/0 4 root NOFD /proc/4/fd (opendir: Permission denied)
mm_percpu 6 root cwd unknown /proc/6/cwd (readlink: Permission denied) mm_percpu 6 root rtd unknown /proc/6/root (readlink: Permission denied) mm_percpu 6 root txt unknown /proc/6/exe (readlink: Permission denied) mm_percpu 6 root NOFD /proc/6/fd (opendir: Permission denied)
ksoftirqd 7 root cwd unknown /proc/7/cwd (readlink: Permission denied)
ksoftirqd 7 root rtd unknown /proc/7/root (readlink: Permission denied)
ksoftirqd 7 root txt unknown /proc/7/exe (readlink: Permission denied)
ksoftirqd 7 root NOFD /proc/7/fd (opendir: Permission denied)
rcu_sched 8 root cwd unknown /proc/8/cwd (readlink: Permission denied)
rcu_sched 8 root rtd unknown /proc/8/root (readlink: Permission denied)
rcu_sched 8 root txt unknown /proc/8/exe (readlink: Permission denied
rcu_sched 8 root NOFD /proc/8/fd (opendir: Permission denied) rcu_bh 9 root cwd unknown /proc/9/cwd (readlink: Permission denied) rcu_bh 9 root rtd unknown /proc/9/root (readlink: Permission denied)
rcu_bh 9 root txt unknown /proc/9/exe (readlink: Permission denied)
rcu_bh 9 root NOFD /proc/9/fd (opendir: Permission denied)
migration 10 root cwd unknown /proc/10/cwd (readlink: Permission denied)
migration 10 root rtd unknown /proc/10/root (readlink: Permission denied)
migration 10 root txt unknown /proc/10/exe (readlink: Permission denied)
migration 10 root OFD /proc/10/fd (opendir: Permission denied)
watchdog/ 11 root cwd unknown /proc/11/cwd (readlink: Permission denied)
watchdog/ 11 root rtd unknown /proc/11/root (readlink: Permission denied)
watchdog/ 11 root txt unknown /proc/11/exe (readlink: Permission denied)
watchdog/ 11 root NOFD /proc/11/fd (opendir: Permission denied) cpuhp/0 12 root cwd unknown /proc/12/cwd (readlink: Permission denied)
cpuhp/0 12 root rtd unknown /proc/12/root (readlink: Permission denied)
cpuhp/0 12 root txt unknown /proc/12/exe (readlink: Permission denied)
cpuhp/0 12 root NOFD /proc/12/fd (opendir: Permission denied) cpuhp/1 13 root cwd unknown /proc/13/cwd (readlink: Permission denied)
cpuhp/1 13 root rtd unknown /proc/13/root (readlink: Permission denied) cpuhp/1 13 root txt unknown /proc/13/exe (readlink: Permission denied) cpuhp/1 13 root NOFD /proc/13/fd (opendir: Permission denied) watchdog/ 14 root cwd unknown /proc/14/cwd (readlink: Permission denied) watchdog/ 14 root rtd unknown /proc/14/root (readlink: Permission denied) watchdog/ 14 root txt unknown /proc/14/exe (readlink: Permission denied) watchdog/ 14 root NOFD /proc/14/fd (opendir: Permission denied)
migration 15 root cwd unknown /proc/15/cwd (readlink: Permission denied) migration 15 root rtd unknown /proc/15/root (readlink: Permission denied)
migration 15 root txt unknown /proc/15/exe (readlink: Permission denied)
migration 15 root NOFD /proc/15/fd (opendir: Permission denied)
ksoftirqd 16 root cwd unknown /proc/16/cwd (readlink: Permission denied)
ksoftirqd 16 root rtd unknown /proc/16/root (readlink: Permission denied)
ksoftirqd 16 root txt unknown /proc/16/exe (readlink: Permission denied)
ksoftirqd 16 root NOFD /proc/16/fd (opendir: Permission denied)
kworker/1 18 root cwd unknown /proc/18/cwd (readlink: Permission denied) kworker/1 18 root rtd unknown /proc/18/root (readlink: Permission denied)
kworker/1 18 root txt unknown /proc/18/exe (readlink: Permission denied)
kworker/1 18 root NOFD /proc/18/fd (opendir: Permission denied)
cpuhp/2 19 root cwd unknown /proc/19/cwd (readlink: Permission denied)
cpuhp/2 19 root rtd unknown /proc/19/root (readlink: Permission denied) cpuhp/2 19 root txt unknown /proc/19/exe (readlink: Permission denied) cpuhp/2 19 root NOFD /proc/19/fd (opendir: Permission denied) watchdog/ 20 root cwd unknown /proc/20/cwd (readlink: Permission denied) watchdog/ 20 root rtd unknown /proc/20/root (readlink: Permission denied) watchdog/ 20 root txt unknown /proc/20/exe (readlink: Permission denied) watchdog/ 20 root NOFD /proc/20/fd (opendir: Permission denied) migration 21 root cwd unknown /proc/21/cwd (readlink: Permission denied) migration 21 root rtd unknown /proc/21/root (readlink: Permission denied) migration 21 root txt unknown /proc/21/exe (readlink: Permission denied) migration 21 root NOFD /proc/21/fd (opendir: Permission denied) ksoftirqd 22 root cwd unknown /proc/22/cwd (readlink: Permission denied) ksoftirqd 22 root rtd unknown /proc/22/root (readlink: Permission denied)

后面还有一堆这样的错误,可是这些东西并不是我自己开的

sudo rm -rf /

请。

1 个赞

这种打开方式不对啊,用 sudo-edit 吧,不要用sudo打开整个emacs

不过我以前一直就是这么干的, 我用sudoedit打开文件总是报错

重装系统而已。。

用tramp启用sudo

M-x find-file RET sudo::/path/to/file RET

1 个赞