Debian 10 下 man 异常退出“exited with status 159”,提示“bad system call”

Debian 10 下 man (man 2.8.5) 命令异常退出(status 159),提示 preconv: Bad system call

环境

$ uname -a
Linux VM-4-12-debian 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux

$ lsb_release -a
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

$ man --version
man 2.8.5

问题

执行man ls命令发生异常,提示:

man: preconv: Bad system call
man: tbl: Bad system call
man: nroff: Bad system call

man: command exited with status 159: (cd /usr/share/man && /usr/lib/man-db/zsoelim) | (cd /usr/share/man && /usr/lib/man-db/manconv -f UTF-8:ISO-8859-1 -t UTF-8//IGNORE) | (cd /usr/share/man && preconv -e UTF-8) | (cd /usr/share/man && tbl) | (cd /usr/share/man && nroff -mandoc -rLL=143n -rLT=143n -Tutf8)

解决方法

执行man命令前,添加 MAN_DISABLE_SECCOMP=1

$ MAN_DISABLE_SECCOMP=1 man man

如果想避免每次都输入MAN_DISABLE_SECCOMP=1,可以在~/.bashrc中添加全局变量。

$ export MAN_DISABLE_SECCOMP=1 

原因

man 2.8 与 Linux 的 SECCOMP 机制有冲突。

参考

posted @ 2021-12-14 23:36  wkyo  阅读(345)  评论(0编辑  收藏  举报