5

I would like to install TeX Live in my home folder, so that I do not have to reinstall it each time I change from one Linux distribution to another.

When installing TeX Live through the install-tl script the following is shown:

 <D> directories:
   TEXDIR (the main TeX directory):
     !! default location: /usr/local/texlive/2015
     !! is not writable or not allowed, please select a different one!
   TEXMFLOCAL (directory for site-wide local files):
     /usr/local/texlive/texmf-local
   TEXMFSYSVAR (directory for variable and automatically generated data):
     /usr/local/texlive/2015/texmf-var
   TEXMFSYSCONFIG (directory for local config):
     /usr/local/texlive/2015/texmf-config
   TEXMFVAR (personal directory for variable and automatically generated data):
     ~/.texlive2015/texmf-var
   TEXMFCONFIG (personal directory for local config):
     ~/.texlive2015/texmf-config
   TEXMFHOME (directory for user-specific files):
     ~/texmf

How do I modify these directories such that I have a "robust" TeX Live installation?

1
  • Change all /usr/local/texlive to ~/hometexlive; your PATH variable should then contain ~/hometexlive/2015/bin/<arch>; of course you should make ~/hometexlive in advance. Choose the name you like.
    – egreg
    Commented Feb 26, 2016 at 23:17

1 Answer 1

5

Answer 1: using installer options

When you run ./install-tl, you will get some options denoted by <...>. When you hit D and Enter you can change the TeX home directory from /usr/local/texlive/2018 to /home/your_user/texlive/2018. The other paths should automatically change as well.

Don't forget to update your path after installation! You can do this for example by putting export PATH="/home/user_name/texlive/2018/bin/x86_64-linux:$PATH" in ~/.profile. Then you have to logout and login, you can test the installation with latex small2e.

See https://www.tug.org/texlive/quickinstall.html for the more installation documentation.

Answer 2: using environment variables

From this SO answer: you can set the environment variables below before installing texlive, so execute

export TEXLIVE_INSTALL_PREFIX=/home/your_user/texlive
export TEXLIVE_INSTALL_TEXDIR=/home/your_user/texlive/2018

and then run ./install-tl like normal.

Don't forget to update your path after installation! You can do this for example by putting export PATH="/home/user_name/texlive/2018/bin/x86_64-linux:$PATH" in ~/.profile. Then you have to logout and login, you can test the installation with latex small2e.

See https://www.tug.org/texlive/quickinstall.html for the more installation documentation.

Answer 3: using texlive.profile

You can also use a texlive.profile (this also gives you more control about options), either by copying an example or selecting 'save installation profile to texlive.profile' when installing, and then change all /usr/local/ paths to /home/your_user. Then you can install with ./install-tl --profile=texlive.profile.

An example texlive.profile is

# texlive.profile written on Tue Jan 15 17:15:41 2019 UTC
# It will NOT be updated and reflects only the
# installation profile at installation time.
selected_scheme scheme-basic
TEXDIR /home/user_name/texlive/2018
TEXMFCONFIG ~/.texlive2018/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /home/user_name/texlive/texmf-local
TEXMFSYSCONFIG /home/user_name/texlive/2018/texmf-config
TEXMFSYSVAR /home/user_name/texlive/2018/texmf-var
TEXMFVAR ~/.texlive2018/texmf-var
binary_x86_64-linux 1
instopt_adjustpath 0
instopt_adjustrepo 1
instopt_letter 0
instopt_portable 0
instopt_write18_restricted 1
tlpdbopt_autobackup 1
tlpdbopt_backupdir tlpkg/backups
tlpdbopt_create_formats 1
tlpdbopt_desktop_integration 1
tlpdbopt_file_assocs 1
tlpdbopt_generate_updmap 0
tlpdbopt_install_docfiles 0
tlpdbopt_install_srcfiles 0
tlpdbopt_post_code 1
tlpdbopt_sys_bin /usr/local/bin
tlpdbopt_sys_info /usr/local/share/info
tlpdbopt_sys_man /usr/local/share/man
tlpdbopt_w32_multi_user 1

Answer 2 was tested on Arch Linux 4.20.1 with TeX Live 2018, answer 1 was tested on Fedora.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .