简体   繁体   English

如何在不使用 sudo 且不在根目录下运行 man ?

[英]How do I run man without using sudo and not under root directory?

I've encountered a problem that I can't seem to find a solution for.我遇到了一个似乎找不到解决方案的问题。 Running the man command anywhere that isn't in ~ or without using sudo returns:在不在 ~ 或不使用 sudo 的任何地方运行man命令返回:

"/usr/bin/man: can't execute less: Invalid argument "/usr/bin/man: 不能少执行:无效参数

/usr/bin/man: command exited with status 255: ..." /usr/bin/man: 命令退出,状态为 255: ..."

I've tried running export MANPAGER=less我试过运行export MANPAGER=less

$PAGER and $MANPAGER are set to less. $PAGER$MANPAGER设置为 less。 It still does not seem to work.它似乎仍然不起作用。

What do I do?我该怎么办?

Edit: After further review I've noticed that the command works everywhere except a mounted network directory that I use.编辑:经过进一步审查,我注意到除了我使用的挂载网络目录外,该命令在任何地方都有效。 I can use less and echo man ls`` just fine, but just using man as usual brings up the mentioned issue.我可以使用lessecho man ls`` 就好了,但是像往常一样使用man会带来提到的问题。

Try to change the permission and ownership of /usr/bin/man.尝试更改 /usr/bin/man 的权限和所有权。 Make it so that it is executable by everyone.使其对每个人都可以执行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在没有 sudo/root 的情况下运行 libpcap - Run libpcap without sudo/root 从根目录运行一个脚本,它会调用sudo oracle中的另一个脚本。 如何做到这一点而无需询问oracle的密码 - Run a script from root and it calls another script that was in the sudo oracle. how to do that without asking the password of the oracle 如何在没有 sudo 的情况下以 root 身份在 chroot jail 中运行命令? - How to run a command in a chroot jail not as root and without sudo? 如何在su下运行sudo? - How to run sudo under su? Jupyterhub使用没有root的sudo:没有pw不能运行sudospawner - Jupyterhub using sudo without root: can't run sudospawner without pw 如何在没有sudo的情况下运行命令? - How to run a command without sudo? 如何使用BlueZ5库作为普通用户(没有sudo)执行PyBluez示例? - How do I execute PyBluez samples using BlueZ5 library as normal user (without sudo)? 在 linux ubuntu 中使用 CPAN 时,我应该使用 sudo / 作为 root 还是作为我的默认用户运行它 - when using CPAN in linux ubuntu should I run it using sudo / as root or as my default user 如何在不使用sudo的情况下在Ubuntu上安装.Net Core? - How do you install .Net Core on Ubuntu without using sudo? 如何在 Linux 上使用 sudo 在后台运行 dotnet 应用程序? - How can I run a dotnet application in the background using sudo on Linux?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM