[texhax] texhash trouble in TL on Ubuntu
daleif at imf.au.dk
Thu Aug 16 14:44:27 CEST 2012
Hefferon, James S. wrote, On 2012-08-16 14:27:
> 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
> 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
> ftpmaint at millstone:~$ echo 'echo $PATH' | sudo sh
> 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
> ftpmaint at millstone:~$ sudo which 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,
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
That is standard I guess, the root user is not using the same PATH as
the regular users.
On my systems I have a specific LaTeX user who owns the LaTeX
installation, thus I do not have to run anything as root. I think this
provide a better security.
More information about the texhax