[tex-live] Messed up TL installation

Haines Brown haines at histomat.net
Wed Oct 19 21:22:46 CEST 2011

On Wed, Oct 19, 2011 at 04:27:20PM +0200, Zdenek Wagner wrote:
> 2011/10/19 Haines Brown <haines at histomat.net>:
> > I am running Debian Squeeze and installed its version of TeXLive 2009.
> > However, I needed to upgrade TL to 2011 from CTAN. I read on line the
> > advice to delete an old version of TL before installing a newer
> > version. What I did was to delete the texmf directories, and that got
> > me into trouble that I've been trying to rectify.
> >
> I think Debian has its own dummy package that does not install
> anything but keeps the dependencies. The problem is that various
> packages depend on TeX so that you cannot just remove it. 

That was the root of my problems. Someone on line said that to install 
TL 2011, I should first remove the old version. What he meant but did 
not say was to rename or change the PATH for TL 2010. I read it to 
mean remove texlive 2009, which as you surmise did mess a lot of 
things up so badly that perhaps the only way out is to reinstall 
debian from scratch.

> However, you can install TeX Live and prepend it to your PATH and 
> MANPATH. First, as a root, I create /usr/local/texlive and make it 
> writable by me. All TL versions will be there as default. Afterwards 
> I install TL as a normal user and later can do "tlmgr update" again 
> as a normal user. It is possible to have several versions of TL and 
> switch between them. I have a lot of space on one computer so that I 
> can keep 2007 to 2011 and just by changing PATH I can decide which 
> one to use.

When you say "prepend to PATH", do you refer to the point at which the 
CTAN install-tl asks for TEXDIR etc. directories? If so, by default 
the value of TEXDIR is /usr/local/texlive2011. So doesn't this mean 
that the default path is correct and I don't have to prepend anything 

My /usr/local/texlive directory is not currently writable by user. 
That was not a problem because I installed TL 2010 as root (sudo). You seem 
to be offering a way that user can administer TL, but why would I do 
that instead of doing it as sudo?

My immediate problem is not updating TL 2011, but making sure that my 
TL 2011 is properly configured. I would like to do that as sudo. But 
can't as sudo. For example:

  $ sudo tlmgr -gui
  sudo: tlmgr: command not found
this because $ sudo which tlmgr returns nothing. The tlmgr is not in 
sudo's environment. Here is where the executable is located:

  # which tlmgr

And yet this is in sudo's environment:

  $ sudo echo $PATH | grep texlive

How can this be? If sudo's environment includes the directory holding 
tlmgr, shouldn't sudo be able to run it?

install-tl ends with the directions:

  Add /usr/local/texlive/2011/texmf/doc/man to MANPATH, if not dynamically
  Add /usr/local/texlive/2011/texmf/doc/info to INFOPATH.

  Most importantly, add /usr/local/texlive/2011/bin/i386-linux
  to your PATH for current and future sessions.

I tried adding these three to ~/.bashrc, but that didn't work. So I 
added them instead to ~/.profile. That helped, but I found I could not 
get everything (muttprint, I think) running unless the 
PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH; export PATH line 
was also in .bashrc.

If one installs TL as sudo and if one intends to run TeX commands as 
user, where are these path statements supposed to go?

Haines Brown

More information about the tex-live mailing list