This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Knowledge Base:Man says no such file or directory for less
From Gentoo Wiki (test)
Synopsis
When asking for a man page, man returns sh: /usr/bin/less: No such file or directory
.
user $
man emerge
sh: /usr/bin/less: No such file or directory Error executing formatting or display command. System command (cd "/usr/share/man" && (echo ".ll 9.9i"; echo ".nr LL 9.9i"; echo ".pl 1100i"; /bin/bzip2 -c -d '/usr/share/man/man1/emerge.1.bz2'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -mandoc | /usr/bin/less) exited with status 127. No manual entry for emerge
Environment
This occurs after a --depclean
operation. The sys-apps/less package is not installed (anymore):
user $
less
bash: less: command not found
Analysis
When running emerge --depclean, Portage recently wants to remove sys-apps/less as it already found a package that provided the virtual/pager requirement. Unless the user picks the less package themself, it is slated for removal.
Resolution
(Re)Install sys-apps/less:
root #
emerge --ask sys-apps/less