linux man手册返回错误 man: command exited with status 159

我的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
linux 版本信息
使用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这句。

  • 10
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值