[tex-live] Messed up TL installation

Vladimir Lomov lomov.vl at gmail.com
Wed Oct 19 16:13:05 CEST 2011


Hello,
** Haines Brown [2011-10-19 09:30:15 -0400]:

> 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'll try to be brief.

> 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?

You should understand that there is TeX Live distribution, current one
is TeX Live 2011, which is independent of any Linux distributions
(Debian, Ubuntu, Fedora, Arch Linux and etc) _and_ texlive packages
provided by Linux distrubtion that should be installed by using package
manager (apt-get or dpkg, I don't know the proper name of it for Debian,
sorry).

You could install TeX Live 2011 _and_ texlive packages. The later will
be placed in standard directories like /usr/bin for programs and
/usr/share for data. When you install TeX Live 2011 you first choose
the directory in which it will be installed (usually
/usr/loca/texlive/2011). As you can see, both use different paths.

Usually, the path to TeX Live programs
(/usr/local/texlive/2011/ARCH/bin) is prepended to the PATH variable in
order to run them (pdflatex, xelatex, lualatex) prior to the package
ones (this is what you want).

> 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!

IMO, what is happened here: you run dpkg as root (I would use sudo
instead), but the PATH is set as I described above: dpkg is using TeX Live
programs not, as it would expect, texlive ones. To avoid that
confusion, you have to run at first

# export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
and then

>   # 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 
> "no":

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

> apt cache sees it: 

>   $ ls /var/cache/apt/archives/ | grep texlive
>   texlive_2009-11_all.deb
>   ...

> Should I have first removed all texlive_2009 packages from the 
> archive?

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

>   $ which tlmgr
>   /usr/local/texlive/2011/bin/i386-linux/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!
>   Completed.

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

>   # which tlmgr
>   /usr/local/texlive/2011/bin/i386-linux/tlmgr

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

>   $ sudo echo $PATH
>   /usr/local/texlive/2011/bin/i386-linux:
>   /usr/local/texlive/2011/bin/i386-linux:
>   /usr/local/bin:
>   /usr/bin:
>   /bin:
>   /usr/local/games:/usr/games

>   # echo $PATH
>   /usr/local/texlive/2011/bin/i386-linux:
>   /usr/local/sbin:
>   /usr/local/bin:
>   /usr/sbin:
>   /usr/bin:
>   /sbin:/bin

> 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

Norbert Preining, Debian maintainer of texlive packages monitor this
list too, so he can answer on more Debian-specific questions.

---
WBR, Vladimir Lomov

-- 
Hey, I had to let awk be better at *something*...  :-)
             -- Larry Wall in <1991Nov7.200504.25280 at netlabs.com>1


More information about the tex-live mailing list