You are not logged in.

#1 2018-06-22 11:45:39

donuon
Member
Registered: 2013-08-28
Posts: 42

[SOLVED] Error with man pages for regular users

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

#2 2018-06-22 12:43:39

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,086
Website

Re: [SOLVED] Error with man pages for regular users

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

#3 2018-06-22 13:02:52

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

#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

#4 2018-06-22 13:57:43

seth
Member
Registered: 2012-09-03
Posts: 19,797

Re: [SOLVED] Error with man pages for regular users

type man
sudo type man

Offline

#5 2018-06-23 23:47:23

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

#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

#6 2018-06-24 01:39:53

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,518

Re: [SOLVED] Error with man pages for regular users

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

#7 2018-06-24 07:43:41

loqs
Member
Registered: 2014-03-06
Posts: 13,179

Re: [SOLVED] Error with man pages for regular users

Does the following work as expected?

MAN_DISABLE_SECCOMP=1 man man

Offline

#8 2018-06-24 10:44:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,181

Re: [SOLVED] Error with man pages for regular users

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

#9 2018-06-27 23:33:01

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

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

#10 2018-06-28 00:20:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,181

Re: [SOLVED] Error with man pages for regular users

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

#11 2018-06-28 11:19:11

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

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

#12 2018-06-28 11:19:51

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,181

Re: [SOLVED] Error with man pages for regular users

So Post your bashrc.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2018-06-28 11:51:52

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

#
# ~/.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

#14 2018-06-28 12:39:05

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,181

Re: [SOLVED] Error with man pages for regular users

Ok, now read the line you added.  Typo?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#15 2018-06-29 11:09:08

donuon
Member
Registered: 2013-08-28
Posts: 42

Re: [SOLVED] Error with man pages for regular users

LOL oh wow I must have staring at that for too long. Thanks Trilby, works now.

Offline

Board footer

Powered by FluxBB