2

On my CentOS 6 box, all the man pages and some tools that support --help show gibberish. For example, if I type:

man man

I get this:

^HZ[wã¸~ǯÀjZÊèvg:=3ÌlËm’¾­¤ÞÎl<;HHBL´Z}òãSe{l?´)B¡ê«¯                                                                                                                Hî{"¹ïɺХªt&U]ÙªLªò|/¥ÝÈ*ãÄr±ÕZSÔK³ªK-]Zmà[úr­
¹U+-¶Ä®²¯ûá¦w[U­MS»Ýfµ®d?Èãï¾{;ÄÿòOv]ÈϨÊí?ÚFÙË̸ª4ºÒ².2g©t¹qÒ.éÇÇO~m¹¼«¹Ii+êÂi©t[¥Ã±Ët2>»È¥Éa¬µª‘©íäÎTkúK:NÞÒ8IJ°#7½ùûNÿ1]ëdý¢¢³^é­*«.*øt­7¨x9)V¦Ðº4ÅÍaÞOyÔ¥3ÕÎq       ÒkWþüðíãwñ¶ìeºVÅ
3J/øµ-l_/ó{Ì/x¡²7ÓÛJoÝãïòÝÛ·ïáóÕ­<ÉìBÞ¯’[ÞhA"ÜnPÌ6Wd.Ò£VãÕ°6´G}g?ÞÜÞÍ.g"9¡ÉD2=T-Ï×®våOþíhF#j[màñr*ÝÞ|ñ­ÿP¡þâ§üm÷gÚáèë5ÅirØ×fæûÑÿ°%DNèõ¢´;×ýpAÖÕ&ÒgæeÓ)ÚÌÏ<~¾Ïþ-½¸½Bm´L¤’H]gÙéôòn~y{ã5&Xã.V¹{Qç‘K¹ßaßÇÈaÓà÷¹µ=v4´ñNÅ&(#(
ßIîN[‘(wk®%4¯ö[0¡½ö                                    ]:dC¹¬r(........Dp£Ð».ìN¥Y6sÃ^VÊéråÖ¤è¾<)‘l4*o¦dØÔe*ô|Å>î.......                                    U<³¼fÔS                                     ý2#ôpähimæ2
Eóá(ÍðÓÑB«¯÷Ëir¿¼?¹»3­åBçvG¨d¦1½BwkÏzÇÊ#Y]"$ÂõøæÓøJÎ&§h3øà*Ð*³°[î‘Læu¦¿ß¾ÃéÅ’4ÛSV¹¯ß;Ô)ìOóö·â@sQªr/ÏýÞ4¿gúípúùÎQàÐä½Àò<²×S[;ýN|TµºJä_×Æ¥:ÏU¡UxùmsmL8L(+ksàL«Mü,j’SJ»1_u¬‘ä6ec.®]V‘P^ReÁmWô0vÕÛ;Þ/ëýèþÿNe/!ò8ôXY;ý_ô9ÓKUçx6GºJ0(s7>}ÞößA,Á5Hà,%3%¬Âôs;­JXrá
‘Ë®&°TQ©ÍY       ãBêÍn¢r¢°U                   gîZ‘àÈsèÒMÆÓÓy7Xt~;F7þ8õd/íPÛ®·ñuHðÆzß()M¦sÇ                   ]<ÒUiÔ"oÁ¤.éÍ]CsXÇÉ>ì[­                    ï‘ï¨våÑÂGà#w;XÐÉÁ:Bá¼ËùõWÖu2½ý<{aYɯùDJ­r3vÙdD¼æS½&+öxy^%ï
9Ó£mOy£Tl°ð:k|?$¯ZBòó²ÇB)ñÌBv&Ï¥þÁ      ¦.......س)Aº8$J,@7Û’ÇÍZáÀsSR¼ì0¸8Þ6æt=0²%yêß...*Ûé;HÅT{ÊGþmk±A!Ho±¬·£Ê2ÄÜ"Öê*çu±v......ݵ*‘)˯¦ùN9O1q¯8B(ÕUð¡Õ,MAëEMöö¸ÞH@;&µeYÓÍ:kÌÄ-ÞÀ¤UM|%&¶0%D‘                 02°¹²
¾^Ô«rxSð²vø3qbAòfkÀx¦«Ä®>K1ù¥6*ÇuVLÛí¦Ôð,ÝãfÍc°$7B¡q½ÖâdQr­ó-ìs¸($Zi§íÃ3B©mi·ÖuíÏCÈBfÓä_¯ÂþTý(îÈϪD«ø-Â
½¯ÚKpÁ=0?»ûyYì®0y’ù’2e+WGÁÒÖ+ÀóL«!âéf¦k$Í4I¥¶¶FÅÌMlÁ¦Þ¿}Ö°Äb%m*w.Ðôøü®´å@sPDFq»V³ÅiHYÝPîô/µ.RâÞ°ß#@gK¦¬Ñ¿@ëTEiKà±´Qþmº±aKÛbð#XZ+Ò¸eÑ....¨mIwòþç~׸P$í̪ðlb#U©¿BÿRȾåªT[Ù_Á¤
²¿jË~+X|&ûðvÒ/¯cóôöü|6ùï×á¹Bj?¸"æ‘]#s6EHЯçls...¶Á~¶5Ùèª^$DØ«ó-ü‘vùÊÄÑêÎrR4À´µ^      óGÕ¨ù¡k­,QBYÌÞBPÇEÕ9xqÈúñ½zT&WûBáb‘Æ9Â0ÒÀ"N¡ÙüQoøc;éФ>‘0D´dÉ[1üÁQiøÐÞIHÀl     CpÞÿÍZÎûnêä@¹³u¡àm8±MÜ¡0ß.,Xöª&c#oþ^ùûÈ?È&/³q
º2PÀ}ÿÇ0y¹ôhÉDqrS<vá%i¾ÒSǨÍÉ,Zz~ÒôY¹¬%Ve*åláËC9Û$©çãêAÝyy²ôsfÔgZí?äP)´.CÎ{س®ÞéxîÓUHB®                â¢,X(BòVEûóÛ2c/¾°R÷,¿6¿°E&68/UXn¾FSQáΧäÜf<»b÷Bà¬Yx6÷V3[üFm·                kʱh(+r#x<ŵÌ2ÅÛ*’&,Ñ"Jxã&+±ÚQ
Îöê0{zwHÖ¨"¶¶ãl©­éÛ·¿>f´¦âÃþCÞÜO/&Tä+À;Yp½Q:8«BË#ßI°¸Z‘M   xÑbÓî                                                                                                                       nG·±ø¿ýðþ=:.ÀÈ®4F¬G.....q$B
A¡ó¹a~÷Ío¿¿ÏG.÷$Ã4*‘°¦Àz­-˸ÒìDZ6$Æ._èî,6®ça:R¢Â<p¨<àÖçóá@=Û¡P.4........ÓT~3rÍ[ñP,Í;1£7Ã’¬*5tÝQÅÙmÈvô$­‘Lô0mâìÔ{ã­6Gjhü"¼eX¸xÝ7‘Ë9ÐMá^¤.àBrå<<6_·ê/[ðz ÙC×ÖÅ‘DûÈe|ïáÃÓ+òlÀ¾þñ@kBÕt)ä»5ø:ÿÎ.....rÓ2hçWk,qKµ[@m<"ôÔðÊÄyR­vH-$A>úmfjøó,èË.§µ2ö:bÚ‘¬ÕEúºÖuIÂ;6¶sʦ-ë°¿¦®ÜÄlOÜPµfÙ$LáÐøÃÓ3|î´
täp>¾s                          ôhóGb5                          êI]å2;:P8ö#B#ÅñBÁ<{‘+Ãfv:t|î|7ÞZ·Ê"1’ïðÈÛx){£PyDv#xï(xsÔ"ÚrÌèi9æ°ØHÒ5uý°°Ñ½æãD®ÆSÌ]ârßüâjÎ       ÞXûFµßB=3N¼$Þ¿                           z9ÀBnRS-
Fxd*ixÉAãäô^äö¬8µÎíÍBUÔ¿O¢QÀú#®   Üóø¼«,H!1¥¡LñRéÒ.ð<Xm´ÎUyX^¡nB6AI0ïý³.Ñ76Àô[,ðRü|=¾±(À2Cþ      V³Þ˦Jµ}è>sôû¬MÙÏñäG¥ë(
úÊÙ¥Q   Í"¢Y¢ÐÊßÐ6G%¬ÎÀQÍ2}°JA«ô9ÀáAQç@É’©aMFv^î²ÔnkYg;v¶hÛ0îÕnØcù8Õ«±ýÒþ.º.....ÌÔÍQ½ûËþkb«®ºHÔ‘¢U©6qNÕ³lG’¤aûi|Zz¯,<Hûáw·µcbý~iD[Ù­î½..Éu|ö~màu¾ªò²i·a¥s+£=%ì*¤¹W}JHÐ;]½xqQÑ                  OÀo^VÚ¶h@ä+kóÇppj>,
ñÁd{¤Fì|s;þ4¿íâÊûDù-|~ÓâÍ%ðáë   ÝÂ>bû0<FQbìÕuI‘{÷ËéÐ×Áãz¹4_ÚC_&³óY?/Ù³­ã        FSÉÈ£º:]{qøxs8W:¢MO^»è>7>t;¾ÄÐúnb,-jïODãÄÔêð    ÷Sí>É~‘몷ô;ãô,ª.ðlµ¡liÐ0õqX"ε)ñP‘8|ªeÙçÊXR²úú"q[}5Ûí..±Ù)¦NòÕ§3AsCÐCûöäô¬*dQCGÌxþK8åh’*y®>¹ùËéíÍõäfJ3!*sê~Q©¨j·è;_y‘wF|><á«éÝê3¾©ù5îÝ yH¸°"ËÃ)ÀÊg_Àjä|ø+ÿ­Ó_ôU¤«fùHÁ_sö
^Hµ7Z.#ÑÚ                                                                          µAS¶¥AÎmÖÛ=UºúÀTWú*Ì<áÅËBQ!ï¬ñÉ~¶¼ñLøº’<t/ì*~t²ÕRº¥U*db9=¥=òÈ-ÓÁf³.úõ/.#߯©¶|¾<;º¡;Uk.{âr[ÎÔVbÛýõ>=kkZ¥òkqíÉ!5vª#çïJßjë·§´".LóÅ-
ioø©ÎLä±2IQrØùM×°pI‘I¨¯,mçTjOn        FPºæxzàpîöÐÑhN¾OðìíÅç¦7g¼ß|ôGOl÷éu8G....*ÄS9¡åeQQYqLþsþ!{ð7,Ö¾áÃÿTáñ-VÊ‘°âB           ’Ir=QU/¥s9Áö*xJ          =øÞqW^¼å¸1½ç²3Vaïæjà<W§?_Of3æ!©³Gûøl]èwLôãî¢OXÆ{ÒÔdrüåA     z
øÄ試ð’5þÐ-UÃ+ÛU"úXDÁ/béñ:´‘pD  ²9×Pí¡eaÃ0h&¡>ð¸ÔWJ¼S¼bcyé:W   ©ô;¶i¬÷éüÇ»I£QRJøË’Ù¡å²/í÷öÔìÇÙ|r=E¾âbIsPcóÕ;r>]DHü¸z»ñÑOg¡p?    e   ¾°³åãb.E±ê±...Gât"M¼(JÞ¬Ä.Üö{ýîý{¬vÿ~|öuÐÊëý,ɲþí   Líôb<MæÀîâøZU"MHæùåÝ,LF5â
ì¯r»P‘cô÷ò¯ýåñà’àj³Èìd.w~ñf‘lð«~ZT‘åÙþ        <NæÄ%0S½Q©ãº÷Úµáò÷ù1sºÄrÅ¢Ü_Õ¤¼Ô’ÿ~JüÁrãï£Ý¹õù5xfNxÔUUt­’í-Túà¶
/¡ËÐ|@´+÷#ùÔ±ëèr´?àÏ^W_*Ò1¤z·Sѹ1OW}è¸4+¹0̵-C..KhÃÿ«÷¼Nä.F*7pÏoé¿cw1Nüìð$ðë­¯³5tÇÉo$Õðð~s’µòªNÍüÞÈß/óðüGn[®5Áã(«°Jù:ûD¯f·=áoÅ:ýµzÄàHtJOOmW9Å?..ÑAy«1.

I don’t think it has to do with the environment variables, but here is what I have:

$ env
MANPATH=/usr/share/man
TERM=xterm
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
PWD=/home/UNIXHOME/mlakata
SHLVL=1
HOME=/home/UNIXHOME/mlakata
_pam_krb5_stash_mlakata_.COM__1_shm5=327688/23401
_=/bin/env

I also tried my old standby of tset to fix corrupted terminal windows, but that didn’t help.

2 Answers 2

2

I would recommend checking the contents of /etc/sysconfig/i18n:

The /etc/sysconfig/i18n file sets the default language, any supported languages, and the default system font.

There is a larger discussion on man pages and possibly corrupted characters on this site that discusses things like this. One thing of interest is the discussion of the man.config file located here:

/etc/man.config

I use Ubuntu—so I cannot find that file on my system; the setup of man on Ubuntu differs from CentOS—but the example shown shows two lines I believe are relevant to this:

COMPRESS /bin/gzip
COMPRESS_EXT .gz

The logic being what you are describing seems to me like the raw, compressed man file being displayed on the screen. So perhaps something in the decompression process is mucking up the works?

4
  • Thanks. The contents of file that match the contents on another system we have (LANG="en_US.UTF-8"\nSYSFONT="latarcyrheb-sun16") and man works fine there. Feb 27, 2015 at 17:50
  • 1
    This most certainly looks like a compression issue. Man is normally a chain of commands although some systems have integrated it into one command. If it is a chain, then gzip should be in there. It's easiest to check with a second session using pstree.
    – user282666
    Feb 27, 2015 at 18:44
  • 1
    That was the problem. The /etc/man.config on the bad system had just one line that said MANPATH /opt/intel/mic/share/man. The smoking gun is then the RPM that installed the Intel MIC stuff. It should have appended that line rather than overwrite the file. THANKS! Feb 27, 2015 at 18:53
  • 1
    I don't know which RPM that is. I'll leave that up to the sysadmin to figure out what broke, I'm just a user with sudo ... Feb 27, 2015 at 19:49
2

This is the contents of a "good" /etc/man.conf for CentOS6, in case anyone gets into this state (i.e. something wipes out /etc/man.conf and you are stuck because you can't read man pages!). Thank @Giacomo1968's answer for pointing me in the right direction. In this case, the decompressor is lzma.

#
# Generated automatically from man.conf.in by the
# configure script.
#
# man.conf from man-1.6f
#
# For more information about this file, see the man pages man(1)
# and man.conf(5).
#
# This file is read by man to configure the default manpath (also used
# when MANPATH contains an empty substring), to find out where the cat
# pages corresponding to given man pages should be stored,
# and to map each PATH element to a manpath element.
# It may also record the pathname of the man binary. [This is unused.]
# The format is:
#
# MANBIN                pathname
# MANPATH               manpath_element [corresponding_catdir]
# MANPATH_MAP           path_element    manpath_element
#
# If no catdir is given, it is assumed to be equal to the mandir
# (so that this dir has both man1 etc. and cat1 etc. subdirs).
# This is the traditional Unix setup.
# Certain versions of the FSSTND recommend putting formatted versions
# of /usr/.../man/manx/page.x into /var/catman/.../catx/page.x.
# The keyword FSSTND will cause this behaviour.
# Certain versions of the FHS recommend putting formatted versions of
# /usr/.../share/man/[locale/]manx/page.x into
# /var/cache/man/.../[locale/]catx/page.x.
# The keyword FHS will cause this behaviour (and overrides FSSTND).
# Explicitly given catdirs override.
#
# FSSTND
FHS
#
# This file is also read by man in order to find how to call nroff, less, etc.,
# and to determine the correspondence between extensions and decompressors.
#
# MANBIN                /usr/local/bin/man
#
# Every automatically generated MANPATH includes these fields
#
MANPATH /usr/man
MANPATH /usr/share/man
MANPATH /usr/local/man
MANPATH /usr/local/share/man
MANPATH /usr/X11R6/man
#
# Uncomment if you want to include one of these by default
#
# MANPATH       /opt/*/man
# MANPATH       /usr/lib/*/man
# MANPATH       /usr/share/*/man
# MANPATH       /usr/kerberos/man
#
# Set up PATH to MANPATH mapping
#
# If people ask for "man foo" and have "/dir/bin/foo" in their PATH
# and the docs are found in "/dir/man", then no mapping is required.
#
# The below mappings are superfluous when the right hand side is
# in the mandatory manpath already, but will keep man from statting
# lots of other nearby files and directories.
#
MANPATH_MAP     /bin                    /usr/share/man
MANPATH_MAP     /sbin                   /usr/share/man
MANPATH_MAP     /usr/bin                /usr/share/man
MANPATH_MAP     /usr/sbin               /usr/share/man
MANPATH_MAP     /usr/local/bin          /usr/local/share/man
MANPATH_MAP     /usr/local/sbin         /usr/local/share/man
MANPATH_MAP     /usr/X11R6/bin          /usr/X11R6/man
MANPATH_MAP     /usr/bin/X11            /usr/X11R6/man
MANPATH_MAP     /usr/bin/mh             /usr/share/man
#
# NOAUTOPATH keeps man from automatically adding directories that look like
# manual page directories to the path.
#
#NOAUTOPATH
#
# NOCACHE keeps man from creating cache pages ("cat pages")
# (generally one enables/disable cat page creation by creating/deleting
# the directory they would live in - man never does mkdir)
#
#NOCACHE
#
# Useful paths - note that COL should not be defined when
# NROFF is defined as "groff -Tascii" or "groff -Tlatin1";
# not only is it superfluous, but it actually damages the output.
# For use with utf-8, NROFF should be "nroff -mandoc" without -T option.
# (Maybe - but today I need -Tlatin1 to prevent double conversion to utf8.)
#
# If you have a new troff (version 1.18.1?) and its colored output
# causes problems, add the -c option to TROFF, NROFF.
#
TROFF           /usr/bin/groff -Tps -mandoc
NROFF           /usr/bin/nroff -c -mandoc 2>/dev/null
EQN             /usr/bin/geqn -Tps
NEQN            /usr/bin/geqn -Tutf8
TBL             /usr/bin/gtbl
# COL           /usr/bin/col
REFER           /usr/bin/grefer
PIC             /usr/bin/gpic
VGRIND
GRAP
PAGER           /usr/bin/less -is
BROWSER         /usr/bin/less -is
HTMLPAGER       /bin/cat
CAT             /bin/cat
#
# The command "man -a xyzzy" will show all man pages for xyzzy.
# When CMP is defined man will try to avoid showing the same
# text twice. (But compressed pages compare unequal.)
#
CMP             /usr/libexec/man-cmp.sh
#
# Compress cat pages
#
COMPRESS        /usr/bin/lzma
COMPRESS_EXT    .lzma
#
# Default manual sections (and order) to search if -S is not specified
# and the MANSECT environment variable is not set (1x-8x sections are used by
# xorg packages).
#
MANSECT         1:1p:8:2:3:3p:4:5:6:7:9:0p:n:l:p:o:1x:2x:3x:4x:5x:6x:7x:8x
#
# Default options to use when man is invoked without options
# This is mainly for the benefit of those that think -a should be the default
# Note that some systems have /usr/man/allman, causing pages to be shown twice.
#
#MANDEFOPTIONS  -a
#
# Decompress with given decompressor when input file has given extension
# The command given must act as a filter.
#
.gz             /usr/bin/gunzip -c
.bz2            /usr/bin/bzip2 -c -d
.lzma           /usr/bin/unlzma -c -d
.z
.Z              /bin/zcat
.F
.Y
#
# Enable/disable makewhatis database cron updates.
# If MAKEWHATISDBUPDATES variable is uncommented
# and set to n or N, cron scripts
# /etc/cron.daily/makewhatis.cron
# /etc/cron.weekly/makewhatis.cron
# will not update makewhatis database.
# Otherwise the database will be updated.
#
#MAKEWHATISDBUPDATES    n
MANPATH /opt/intel/mic/share/man

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .