我的linux版本信息是:
ubuntu@VM-8-6-ubuntu:~$ uname -r
4.15.0-142-generic
ubuntu@VM-8-6-ubuntu:~$ man -V
man 2.8.3
ubuntu@VM-8-6-ubuntu:~$ cat /etc/issue
Ubuntu 18.04.4 LTS \n \l
使用man 命令查看任务的函数或命令时,都出错。
Manual page ls(1) line ?/? (END) (press h for help or q to quit)man: nroff: Bad system call (core dumped)
man: tbl: Bad system call (core dumped)
man: preconv: Bad system call (core dumped)
Manual page ls(1) line ?/? (END) (press h for help or q to quit)
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=206n -rLT=206n -Tutf8)
查了很久,找到的原因是man 2.8.3的版本与linux 的SECCOMP 机制有冲突。有人说可以升级到man 2.9 以后的版本不会有这个问题,但是,我在ubuntu默认下,更新了man的版本,还是2.8.3的。如果要手动更新,就有点麻烦。
所以,我用了另一个方法,就是禁用MAN 的SECCOMP。
临时使用:
MAN_DISABLE_SECCOMP=1 man ls
设到环境变理后:
export MAN_DISABLE_SECCOMP=1
就可以直接使用,不用每次都加MAN_DISABLE_SECCOMP=1这句。