[texhax] texhash trouble in TL on Ubuntu

Hefferon, James S. jhefferon at smcvt.edu
Thu Aug 16 14:27:34 CEST 2012


Last month I got help on this list with a question about installing a font http://www.tug.org/pipermail/texhax/2012-July/019386.html .  
I run Ubuntu Linux and the issue was that I used the tex that I got from the Ubuntu package system and one of the good pieces of advice 
that I got was to also install the TeX Live from tug.org and the two would not interact -- the newer second one would just sit in front of the 
first one that I already had and shadow it (so, for instance I could install AUCTeX via Ubuntu's system and the dependence would be 
satisfied).

I've been working on stuff that needed TeX and so haven't had a chance to fool with my setup.  Now I've had that chance and wanted to
report a small FYI, a word to the wise, for a person who later finds the above advice via a search engine.  The situation is a bit uglier.

Ubuntu doesn't want you to use a root account so you typically running texhax via sudo.  
  ftpmaint at millstone:~$ sudo texhash
  [sudo] password for ftpmaint: 
  texhash: Updating /usr/local/share/texmf/ls-R... 
  texhash: Updating /var/lib/texmf/ls-R-TEXMFMAIN... 
  texhash: Updating /var/lib/texmf/ls-R-TEXLIVE... 
  texhash: Updating /var/lib/texmf/ls-R... 
  texhash: Done.
After a lot of confusion about why kpsewhich wouldn't report my new files, I finally noticed the gotcha in the above: sudo does 
not use the PATH. 
  ftpmaint at millstone:~$ echo $PATH
  /usr/local/texlive/2012/bin/i386-linux:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
  ftpmaint at millstone:~$ echo 'echo $PATH' | sudo sh
  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
The Ubuntu package system puts things in /usr/bin and so texhash was using that one rather than the one I just installed from tug.org.
  ftpmaint at millstone:~$ which texhash
  /usr/local/texlive/2012/bin/i386-linux/texhash
  ftpmaint at millstone:~$ sudo which texhash
  /usr/bin/texhash

I ran texhash by hand and it worked fine.
  ftpmaint at millstone:~$ sudo /usr/local/texlive/2012/bin/i386-linux/texhash
  texhash: Updating /usr/local/texlive/2012/texmf/ls-R... 
  texhash: Updating /usr/local/texlive/2012/texmf-config/ls-R... 
  texhash: Updating /usr/local/texlive/2012/texmf-dist/ls-R... 
  texhash: Updating /usr/local/texlive/2012/../texmf-local/ls-R... 
  texhash: Updating /usr/local/texlive/2012/texmf-var/ls-R... 
  texhash: Done.

Thanks again,
Jim


More information about the texhax mailing list