![在 Fedora 25 上执行所有类型的手册页帮助时出错](https://linux22.com/image/698235/%E5%9C%A8%20Fedora%2025%20%E4%B8%8A%E6%89%A7%E8%A1%8C%E6%89%80%E6%9C%89%E7%B1%BB%E5%9E%8B%E7%9A%84%E6%89%8B%E5%86%8C%E9%A1%B5%E5%B8%AE%E5%8A%A9%E6%97%B6%E5%87%BA%E9%94%99.png)
[user1@testMachine ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 25 (Twenty Five)
Release: 25
Codename: TwentyFive
[user1@testMachine ~]$ man wget
sed: can't read 2>/dev/null: No such file or directory
sed: can't read |: No such file or directory
sed: can't read less: No such file or directory
man: command exited with status 2: sed -e '/^[[:space:]]*$/{ N; /^[[:space:]]*\n[[:space:]]*$/D; }' | (cd <fd 3> && LESS=-ix8RmPm Manual page wget(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$PM Manual page wget(1) ?ltline %lt?L/%L.:byte %bB?s/%s..?e (END):?pB %pB\%.. (press h for help or q to quit)$-iMSx4 -FXR MAN_PN=wget(1) sed s/\([[:space:]]\+[0-9.\-]\+\)$/\1/;s/\([[:space:]]\+[0-9.\-]\+[[:space:]]\)/\1/g;s/|/|/g;s/^\([-+]\+\)/\1/ 2>/dev/null | less)
甚至很多帮助命令都不起作用,并显示相同的错误页面。
答案1
您应该这样做export MANPAGER=less
,检查/usr/bin/man wget
此后是否可以正常工作,如果可以,请仔细查看 RC 文件中是否存在 MANPAGER 和 PAGER 的覆盖。
答案2
您可以尝试重新安装 man 包:
yum reinstall man
您看到的错误让我感到害怕... 2> /dev/null 会向 /dev/null 发送错误消息(基本上消失了)这样做的理由很少。
您是否已检查which man
过它是否是二进制文件?