[tex-live] Messed up TL installation

Haines Brown haines at histomat.net
Wed Oct 19 15:30:15 CEST 2011

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.

My initial question is, if one is upgrading to CTAN 2011, is it true 
that old versions of TL should be removed first? If so, does this 
refer to both TL 2010 and TL 2009? By "removal" does that use of a 
package manager, such as aptitude purge? But if the old TL was 
installed manually, what is the best way to remove it?

I not only removed the old texmf directories, but also ran # aptitude 
purge texlive. I then installed TL 2011 from CTAN using the install-tl 
binary. This procedure messed things up in various ways it seems, and 
I'm trying to recover.

Although I can run latex, lualatex, biber commands on .tex documents, 
when I tried to install a CTAN package using $ sudo tlmgr, I could not 
do it because I was told texlive-common and texlive-base were not 
configured. Then I tried to run # tlmgr (using su rather than sudo), 
and this time it installed the package but also configured 
texlive-common and texlive-base. However, this configuration was 
applied to TL 2009!

  # dpkg --configure texlive-base
    Setting up texlive-base (2009-11) ...  

So apparently, although I removed texmf driectories and purged 
texlive, my system still thinks it has TL 2009. While aptitude says 

  $ aptitude show texlive
  Package: texlive                         
  State: not installed
  Version: 2009-11

apt cache sees it: 
  $ ls /var/cache/apt/archives/ | grep texlive

Should I have first removed all texlive_2009 packages from the 

In going through this, somehow I messed up my environment for texlive. 
For example, user can run tlmgr:

  $ which tlmgr

But I can't run it by using sudo: 

  $ sudo tlmgr -gui
  sudo: tlmgr: command not found

unless the full path is provided: 

  $ sudo /usr/local/texlive/2011/bin/i386-linux/tlmgr -gui
  Loading local TeX Live Database
  This may take some time, please wait!

If I use su to become root, I can run tlmgr:
  # which tlmgr

But it seems that tlmgr is in the environment in either case:

  $ sudo echo $PATH
  # echo $PATH

Sudo uses user's environment (sudo user's the double path to texlive 
because the path is defined in both ~/.bashrc and in ~/.profile), but 
root looks to /etc/bash.bashrc where I had to manually append:

  PATH=/usr/local/texlive/2011/bin/i386-linux:$PATH; export PATH

I've spent so much time running around in circles on this that I'm 
tempted to buy a new hard disk and install debian from scratch. It 
would be far less costly to do so, but I still am not comfortable 
about installing texlive from CTAN without messing things up, such as 
where to manually define paths.

Haines Brown

More information about the tex-live mailing list