You are not logged in.
I'm having trouble determining the cause of the following error:
man: command exited with status 2: (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=231n -rLT=231n -Tutf8)
This occurs anytime I try to run man. I have tried with both bash and zsh shells, have tried moving the shell config file and starting a new terminal to see if it was an error in there but the error still occurs. However, if a run sudo man the pages work no problem.
I've tried runnnig mandb but it doesn't fix the issue either.
Could this be a permissions error?
Last edited by donuon (2018-06-29 11:09:25)
Offline
That's strange... man pages should just work.
What is the output of this command?
ls -ld /usr/share/man /usr/lib/man-db/zsoelim /usr/lib/man-db/manconv
Also, I'm not very experienced with this stuff, but I wonder if it's a locale issue. As in, if the man page doesn't know what language you want, then it won't know what to display. What is the output of these two commands?
localectl
sudo localectl
Offline
#ls -ld /usr/share/man /usr/lib/man-db/zsoelim /usr/lib/man-db/manconv
drwxr-xr-x 66 root root 4.0K Apr 10 15:24 /usr/share/man
-rwxr-xr-x 1 root root 15K Apr 5 13:36 /usr/lib/man-db/manconv
-rwxr-xr-x 1 root root 47K Apr 5 13:36 /usr/lib/man-db/zsoelim
#localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: /usr/local/share/kbd/keymaps/personal.map
X11 Layout: n/a
#sudo localectl
System Locale: LANG=en_US.UTF-8
VC Keymap: /usr/local/share/kbd/keymaps/personal.map
X11 Layout: n/a
Offline
type man
sudo type man
Online
#type man
man is /usr/bin/man
#sudo type man
sudo: type: command not found
#sudo bash
#type man
man is /usr/bin/man
Last edited by donuon (2018-06-23 23:49:43)
Offline
If the hashtag you are copying is any indication, you are currently running all of these as root and not as the regular user you should be attempting to test with.
Offline
Does the following work as expected?
MAN_DISABLE_SECCOMP=1 man man
Offline
FWIW, I just saw this, but only when git tries to open a man page - my normal man pages work fine, but...
$ git pull --help
col: invalid option -- 'u'
Try 'col --help' for more information.
man: nroff: Bad system call (core dumped)
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=177n -rLT=177n -Tutf8)
$ MANPAGER= git pull --help
man: nroff: Bad system call (core dumped)
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=177n -rLT=177n -Tutf8)
$ MANPAGER= MAN_DISABLE_SECCOMP=1 git pull --help
GIT-PULL(1) Git Manual GIT-PULL(1)
NAME
...
The last one worked. So in the case where I could replicate the problem MAN_DISABLE_SECCOMP=1 was sufficient to fix it. I also stumbled on another issue here though: git --help seems to spawn a bash shell regardless of what is configured as the default shell or linked by /bin/sh.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
loqs command works, however trying to set the environment variable MAN_DISABLE_SECCOMP=1 and then running man doesn't seem to work. I have to prepend the man command each time.
Offline
Are you exporting the variable? E.g.:
export MAN_DISABLE_SECCOMP=1
man man
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Yes, sorry I forgot to mention its when I try to export it in my .bashrc it doesn't work. However, if I open a terminal and type the export command first then it works. Tried both by opening a new term and running source .bashrc
Offline
So Post your bashrc.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
#PS1='[\u@\h \W]\$ '
GOPATH=~/go
PATH=~/.gem/ruby/2.5.0/bin:~/bin:$GOPATH/bin:$PATH
# Check for an interactive session
[ -z "$PS1" ] && return
export MAN_DISABLE_SECCO=1
#man() {
# LESS_TERMCAP_md=$'\e[01;31m' \
# LESS_TERMCAP_me=$'\e[0m' \
# LESS_TERMCAP_se=$'\e[0m' \
# LESS_TERMCAP_so=$'\e[01;44;33m' \
# LESS_TERMCAP_ue=$'\e[0m' \
# LESS_TERMCAP_us=$'\e[01;32m' \
# command man "$@"
#}
_PROMPT() {
_EXIT_STATUS=$?
[ $_EXIT_STATUS != 0 ] && _EXIT_STATUS_STR=" \[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;9m\]$_EXIT_STATUS\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]"
_BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! $_BRANCH == "" ]
then
_BRANCH_STR="[\[$(tput sgr0)\]\[\033[38;5;11m\]$_BRANCH\[$(tput sgr0)\]\[\033[38;5;7m\]]"
else
_BRANCH_STR=""
fi
PS1="\[\033[38;5;2m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\[$(tput sgr0)\]\[\033[38;5;12m\]\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]╺─╸\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;2m\]\W\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]\[\033[38;5;7m\]$_BRANCH_STR\[$(tput sgr0)\]\[\033[38;5;15m\] \n\[$(tput sgr0)\]\[\033[38;5;7m\][\[$(tput sgr0)\]\[\033[38;5;11m\]\A\[$(tput sgr0)\]\[\033[38;5;7m\]]\[$(tput sgr0)\]\[\033[38;5;15m\]$_EXIT_STATUS_STR \[$(tput sgr0)\]\[\033[38;5;7m\]»\[$(tput sgr0)\] "
unset _EXIT_STATUS_STR
unset _EXIT_STATUS
unset _BRANCH_STR
unset _BRANCH
}
PROMPT_COMMAND=_PROMPT
# virtualenvwrapper
export WORKON_HOME=~/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python2
export VIRTUALENVWRAPPER_VIRTUALENV=/usr/bin/virtualenv2
source /usr/bin/virtualenvwrapper.sh
# Mimic Zsh run-help ability
bind '"\eh": "\C-a\eb\ed\C-y\e#man \C-y\C-m\C-p\C-p\C-a\C-d\C-e"'
# search the official repositories, when entering an unrecognized command
source /usr/share/doc/pkgfile/command-not-found.bash
function homestead() {
( cd ~/Homestead && vagrant $* )
}
# Import colorscheme from 'wal'
# & # Run the process in the background.
# ( ) # Hide shell job control messages.
(cat ~/.cache/wal/sequences &)
#Some aliases
alias e="exit"
alias v="vim"
alias ka="killall"
alias sv="sudo vim"
alias r="ranger"
alias ls='ls -hN --color=auto --group-directories-first'
alias g="git"
alias gitup="git push origin master"
alias mkdir="mkdir -pv"
alias crep="grep --color=always"
alias p="sudo pacman"
alias sdn="sudo shutdown now"
Offline
Ok, now read the line you added. Typo?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
LOL oh wow I must have staring at that for too long. Thanks Trilby, works now.
Offline