[texhax] texhash trouble in TL on Ubuntu

Axel E. Retif axel.retif at mac.com
Fri Aug 17 00:14:42 CEST 2012

On 08/16/2012 07:27 AM, Hefferon, James S. wrote:

> 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).


> 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


> 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:[...]

There are several ways to set up your environment, and maybe Lars' is 
the one advanced users will prefer, though not the one I use. I also use 
TeXLive but have installed Ubuntu (Debian) TL distribution to satisfy 
dependencies (nevertheless, I have AUCTeX from CVS).

What I do is prepend TeXLive path in /etc/environment:

PATH="/usr/local/texlive/2012/bin/x86_64-linux:/usr/local/sbin: [...]"

And then (I think a restart is required) I sudo su to use tlmgr or whatever:

				sudo su
[sudo] password for axretif:
		/home/axretif# 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.



More information about the texhax mailing list