When having excessively long MANPATH
env-vars I end up in a problem with this error:
$> man <any command>
man: manpath list too long
To figure out when the manpath list is too long I created this small script:
#!/bin/bash
export MANPATH=
for i in $(seq 50 10000)
do
export MANPATH=/usr:$MANPATH
man -k gcc > /dev/null
[ $? -ne 0 ] && echo "$i ${#MANPATH}" && exit 0
done
and it seems like it breaks at ${#MANPATH}
close to 500.
Also man -d
does not give me any information I can use... :(
I have never heard (nor found) a limitation to the number of entries in env-vars (besides the maximum length of the environment variables, from which I am far from).
Are there any fixes for this? Preferably a non-root fix ;)
I am running Debian 9.6.
EDIT: This was reported upstream and fixed!