[tex-live] Messed up TL installation

Zdenek Wagner zdenek.wagner at gmail.com
Wed Oct 19 22:12:38 CEST 2011


2011/10/19 Haines Brown <haines at histomat.net>:
> 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
> else?
>
> 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
>  /usr/local/texlive/2011/bin/i386-linux/tlmgr
>
> And yet this is in sudo's environment:
>
>  $ sudo echo $PATH | grep texlive
>  /usr/local/texlive/2011/bin/i386-linux:...
>
> 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
>        determined.
>  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?
>
It depends. Do you want to run it just as you, or is it a multiuser
system? Do you wish to run it just from a terminal or do you have some
icons ore menu items (in Gnome, KDE or other manager) to start TeX or
an editor with a toolbar for running TeX? Will you sit at the computer
or will you run TeX from another computer via ssh? /etc/profile,
/etc/bashrc or /etc/environment will define the PATH for everybody
while ~/.bashrc and ~/.bash_profile will define it only for you. If it
is defined in a profile, it will be defined for Xorg and all processes
started from Xorg (icons, menu items and even a terminal). It will not
be defined without Xorg, ie in the text terminal started by
Ctrl-Alt-F1 and if you connect via ssh. If it is in bashrc, it will be
defined for any terminal (even that started from Xorg) but not in Xorg
in general. I need both, so this is the relevant part of my
~/.bash_profile:

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

And this is the relevant part of my ~/.bashrc:

# User specific aliases and functions
addtopath () {
        if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
           if [ "$2" = "after" ] ; then
              PATH=$PATH:$1
           else
              PATH=$1:$PATH
           fi
        fi
}


# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

addtopath /usr/local/texlive/2010/bin/$MACHINE-linux
export PATH


Hope this helps.
>
> Haines Brown
>



-- 
Zdeněk Wagner
http://hroch486.icpf.cas.cz/wagner/
http://icebearsoft.euweb.cz



More information about the tex-live mailing list