1

The Fedora TeXLive packages do not correctly compile one of my documents. Others cannot reproduce this issue, so I'm testing if a separate TeXLive installation solves the problem.

The Fedora packages are installed to /usr/bin/latex; the separate TeXLive installation is located in /usr/local/texlive/2020/bin/x86_64-linux.

Now I need to set the PATH. Using gedit ~/.profile, I have added the following lines to the (previously blank) file:

PATH=/usr/local/texlive/2020/bin/x86_64-linux:$PATH; export PATH
MANPATH=/usr/local/texlive/2020/texmf-dist/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2020/texmf-dist/doc/info:$INFOPATH; export INFOPATH

This, as far as I can tell, is exactly what TeXLive told me to do.

However, which latex still returns /usr/bin/latex, not the expected /usr/local path.

Where have I gone wrong?

2
  • Why sudo in the edit of the .profile? Did you logout and back in, or source the .profile? Is .profile (as opposed to .bashrc) actually being sourced on login? Commented Dec 30, 2020 at 23:54
  • Using sudo was unnecessary, just a silly mistake on my part. Putting the PATH information in .bash_profile solved the issue! Commented Dec 31, 2020 at 0:31

2 Answers 2

1

For many years I have handled my personal installations of TexLive with ~/.bashrc (and friends).

At the end of my ~/.bashrc I have:

# User specific aliases and functions
if [ -f ${HOME}/.bashrc.${USER} ]; then
    . ${HOME}/.bashrc.${USER}
fi

and in my ~/.bashrc.rick I have (in addition to lots of other stuff):

export PATH=/home/rick/texlive/2020/bin/x86_64-linux:${PATH}
export MANPATH=/home/rick/texlive/2020/texmf-dist/doc/man:${MANPATH}
export INFOPATH=/home/rick/texlive/2020/texmf-dist/doc/info:${INFOPATH}

Every year I update the TexLive installation and the exported paths. It has worked for me very well.

1

I sense there are a few possible fixes to address this, but the one that worked for me (and thus the only one that I've tried) was to include this PATH information not in .profile (as I had) but rather in .bash_profile. Otherwise, the existence of .bash_profile would basically override .profile and nothing would change. (I could have also pointed .bash_profile to use the information in .profile.)

Alternatively, it seems that I could remove .bash_profile (and perhaps a few other .bash* files), but I opted not to go that route.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.