How to install "vanilla" TeXLive on Debian or Ubuntu?

180,941

Solution 1

Use the net installer script from this page on the official tug.org website to install “vanilla” TeXlive.

Tricking Ubuntu into satisfying the package dependencies is more involved and requires using the equivs package. There are basic guidelines for doing so in this post on TeXblog (an unofficial blog). (This page is a bit old and was aimed at older versions of Ubuntu.) The package list there is a bit old, but the same overall procedure should still work. I’m afraid I don’t have a list offhand of what the dummy package should contain; maybe someone else will. (You can always just create new dummy packages as need be if you try to install something it tells you you have unsatisfied texlive dependencies.)

Solution 2

These instructions have been updated for Ubuntu 16.04 and TeX Live 2021, they will probably work on most Ubuntu/Debian distributions.

Installation

Installing "vanilla" TeX Live is not as hard as you think. Things you will need:

  • An internet connection.
  • About 4 GiB of free space (2 GiB if not installing documentation).
  • Root (sudo) powers.

Note: the instructions are meant for the terminal and for installing the "original" most up-to-date version of texlive. If you're uncomfortable with the command line and plenty of sudo instructions, you can probably still install the texlive-full package from the Software center; you will end up with the "stock" version of texlive, which usually lags a bit behind the latest distribution of texlive.

Installation of dependencies

The following packages are required for this guide: wget, perl-tk. Install them with:

sudo apt install wget perl-tk

TeX Live Installer

First the official installer needs to be downloaded with the following commands:

wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xf install-tl-unx.tar.gz
cd install-tl-20220211

The install-tl-20220211 folder is likely to be named differently. You can probably type install-tl and then press tab to autocomplete the folder name.

Now the installation can begin, run:

sudo ./install-tl

This starts the installation process. You can change all kind of options here, most of the the default options are correct. In order to have working executables and man/info -pages after installation where (1) is recommended option in Unix/Linux, while (2) in Windows:

  1. Create the following environment variables for finding your new installation in TeXLive 2021:
    export PATH=/usr/local/texlive/2021/bin/x86_64-linux:$PATH    
    export INFOPATH=$INFOPATH:/usr/local/texlive/2021/texmf-dist/doc/info
    export MANPATH=$MANPATH:/usr/local/texlive/2021/texmf-dist/doc/man
    

This can be added to ~/.profile to automatically apply when opening a terminal.

  1. You can have the installer create symbolic links for you by changing the options: Use o to change the options and l to create symbolic links. The default locations are correct, so just press enter to use them. Use r to return to the installation menu.
    If for some reason you overlooked this and ran the installer, it is possible to create the symlinks retrospectively using the command: tlmgr path add. See the relevant documentation for more details.

In some cases changing the other options can, of course, be helpful. Not installing the doc and source trees will save you a lot (1.8 GiB, 50%) of disk space. This comes with the downside of having to look up documentation online, instead of locally.

If you want to reduce disk space further you can also change the installation scheme or collections, but this will result in not having certain packages installed by default. You can, however, install them later through the TeX live manager.

Press i to start installation. The full installation is likely to take a long time, say between one and three hours (even on relatively fast connections). As usual, your mileage may vary, but if fewer components are selected in your settings, the process is hastened, and the missing components can be easily installed later.

Interruptions: If, for some reason, the installation is interrupted it can probably be resumed by running the installer again. This will prompt you to continue the installation. If you want to start the installation from the beginning it's probably wise to remove the following installed elements +/- possible elements mentioned in the thread answer How to remove everything related to TeX Live for fresh install on Ubuntu?

sudo rm -rf /usr/local/texlive/2021

Failures: Such a long installation process may fail due to interruptions in communications or other reasons. In such a case, you may want to to restart the installation, but this time choose the smallest configuration that would get it going. Then, you can install all missing components with sudo tlmgr --gui.

Finalising the installation

If everything went well all TeX-related commands should work. Verify this by checking the output of which tex, which should be /usr/local/bin/tex.

Fake packages

Now TeX Live works, but it's also necessary to make Ubuntu think you've installed TeX Live. This can be done with the equivs package:

sudo apt install equivs --no-install-recommends freeglut3
mkdir -p /tmp/tl-equivs && cd /tmp/tl-equivs
equivs-control texlive-local

Note: If your /tmp is mounted wit noexec flag, the build will fail as described here. You may just use another directory instead of /tmp in this case.

Then, you'll have to edit texlive-local. For this use the file provided here corresponding to the version you are installing. For instance, for 2020 use:

wget -O texlive-local https://tug.org/texlive/files/debian-equivs-2021-ex.txt

More information about required edits can be found in the TeX Live Debian guide.

Now you can build the package and install it (exact name of .deb is created in first command below; you can also use tab autocompletion):

equivs-build texlive-local
sudo dpkg -i texlive-local_2021-1_all.deb
sudo apt install -f

After this installing texworks through the package maintainer won't install TeX Live again. You can check if this is indeed the case by installing TeX-related packages like texworks, texstudio, qtikz or kile.

Fonts

If you want to install all OpenType and TrueType fonts so you can use them in other programs as well, you'll have to add the TeX Live fonts to the system configuration:

sudo cp $(kpsewhich -var-value TEXMFSYSVAR)/fonts/conf/texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf
gedit admin:///etc/fonts/conf.d/09-texlive.conf

Remove the line containing type1 and save. Now run:

sudo fc-cache -fsv

Updating

If you have installed from a CD, DVD, or an ISO image, you should update your installation to the most recent version of all packages. To do so, run the following two commands:

sudo tlmgr update --self
sudo tlmgr update --all

From now on, you can update TeX Live through the TeX Live Manager with the GUI interface:

sudo tlmgr --gui

It might complain about missing 'Tk', this can be solved by installing perl-tk:

sudo apt install perl-tk --no-install-recommends

Launcher

You can also create a launcher for your desktop environment:

mkdir -p ~/.local/share/applications
cat > ~/.local/share/applications/tlmgr.desktop << EOF
[Desktop Entry]
Version=1.0
Name=TeX Live Manager
Comment=Manage TeX Live packages
GenericName=Package Manager
Exec=pkexec /usr/local/texlive/2021/bin/x86_64-linux/tlmgr --gui
Terminal=false
Type=Application
Icon=system-software-update
EOF

You may need to logout and login again for the changes to take effect.

Note: If the $XDG_DATA_HOME variable is set, use the value of that instead of ~/.local/share/applications. It is also possible to use /usr/share/applications for a system-wide launcher.

Upgrading to the next TeX Live

To upgrade you need to download and run the installer again. Do not forget to have the installer create symbolic links.

It might also be a good idea to run the font section again. You can remove the old distribution(s) by running (for example):

sudo rm -rf /usr/local/texlive/2019
sudo rm -rf /usr/local/texlive/2020

Uninstalling TeX Live

To remove TeX Live completely you need to undo everything you've done:

References and sources

Solution 3

I wrote a script that automates Silex's answer and does (optionally) a lot more. It supports Ubuntu versions 12.04 up to the current version.

Download install-tl-ubuntu and run it as

sudo ./install-tl-ubuntu

To download that script, run

wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && chmod +x ./install-tl-ubuntu

Below I give the list of features from the GitHub repository

  • installs TeX Live 2013
    • automatically finds the fastest repository
    • gives updated progress of the install
    • restarts automatically if install fails
  • tlmgr can then be used to keep your install up-to-date
  • notifies apt so that apt does not try to install the Ubuntu texlive-* packages as dependencies (e.g. if you do sudo apt-get install lyx)
  • links to the folder where Ubuntu installs TeX files so that when you install Ubuntu packages (e.g. FoilTeX and noweb) with LaTeX files, they will be available
  • adds TeX Live fonts to be used system-wide
  • other font-related conveniences
    • tells AppArmor to allow Evince to access the TeX Live fonts
    • can install TrueType fonts that user provides (--truetype-dir)
    • can install IvriTeX Hebrew fonts (--hebrew)
  • optionally installs additional LaTeX files for common journals that are not included in TeX Live 2013 (--more-tex)
  • works non-interactively and thus can be added to a batch install script
  • tlmgr can be run from the desktop menu (if 'gksu' package is installed)
  • install can be done from an ISO file (--iso)

For more details, see

./install-tl-ubuntu --help

Solution 4

Some comments:

  1. According to the Ubuntu package listing, the texlive package is a dummy package whose only purpose is to install a decent selection of dependencies. So it is possible to install this texlive package without installing any of its dependencies. This requires using dpkg instead of aptitude (as far as I can see, and I don't know if it's possible through the synaptic package manager): passing the --ignore-depends=texlive option to dpkg will cause it to forego the dependency check. Then anything that depends on texlive will afterwards install fine (I believe), though if something depends on, say, texlive-bin then it will complain.

  2. Whilst checking the options for aptitude and dpkg for the above, I came across the following snippet from aptitude: the command

    aptitude install texlive&m
    

    will mark texlive as having been manually installed. (Note that the & will probably need some sort of shell escaping to avoid it being interpreted by the shell.) I believe this basically says to the system "I've installed this myself, so you can stop bothering with it.".

  3. Possibly the easiest solution (and the one I use myself) is to simply ignore the system one and install your own version as well. If you do this right, you get the best of both worlds because one possible problem with replacing the system version with your own version is that the upgade may break some dependencies from other packages. It's less likely with something like TeX, but you can imagine that lots might go wrong if you upgrade one of the core system libraries without upgrading all the programs that use it. This is what the /usr/local directory is for. Put your installation of TeXLive in /usr/local/texlive or somewhere using the standard installation (as mentioned by frabjous, for example). By ensuring that /usr/local appears before /usr/bin in your path, and that $TEXMFCNF points to the right place, you can effectively ignore the system installation whilst being able to fall back on it if necessary.

Solution 5

PLEASE THINK BEFORE EDITING! Please do NOT edit this answer in ways which render it distro-specific. Although this question specifically addresses Debian/Ubuntu systems, it serves to provide information to users of GNU/Linux more generally. The way things work on your system may not be the way they work on all GNU/Linux systems - not even all Debian-based systems.

Note that upstream recommend not installing as root. Installing as root introduces a level of risk and has no benefits whatsoever.

Note that I trust the people who are in charge of TeX Live. However, I have been given reason to believe that they are fallible and fallible beings screw up however competent and however well-intentioned they are. Moreover, servers get hacked, downloads get corrupted or intercepted. Shit, basically, happens.

The crucial point is that there is zero benefit to installing with root privileges. All it gets you is an increased security risk. While it may be small, I see no reason to take it.

It is possible to install and manage the installation as your ordinary user. However, that only protects your system directories. Your home directory - where you probably keep all of your personal files and projects - remains exposed. Fortunately, it is easy to protect /home as well.

If you want to follow upstream's advice, then, here is how I do it...

Set up a dedicated user/group and create a suitable home for it

This is the only part you need root privileges for.

The following are generic instructions which should work for most GNU/Linux distros. If you are using a Debian based system or another distro which features the adduser script, see the note below for an easier method. Otherwise, use the useradd command as follows.

Generic GNU/Linux distro: useradd

sudo useradd -d /usr/local/texlive -m -r -U -s /bin/sh texlive

This creates a new user, texlive, as a member of a new group, texlive. It creates a home directory for texlive at /usr/local/texlive.

If you have previously installed TeX Live from upstream, omit the -m flag from the above command. Instead, once you have created the new user, do this:

sudo chown -Rh texlive:texlive /usr/local/texlive

Be sure to set a password:

sudo passwd texlive

You will be asked to choose and confirm a password. Note that what you type will not show up on the screen at all. Just type the password and hit enter. Then do the same to confirm.

If you wish, you can choose some other name for the user/group, so long as it is unique on your system. Suppose you want to use tladmin:tladmin, then you need

sudo useradd -d /usr/local/texlive -m -r -U -s /bin/sh tladmin
sudo passwd tladmin

or, if you've previously installed TeX Live as another user, omit the -m flag and add

sudo chown -Rh tladmin:tladmin /usr/local/texlive

In what follows, <username for texlive> denotes the user name and group of texlive> denotes the group. So, in our examples, both are texlive or tladmin.

Debian-based distro: adduser

If you are using Debian or a Debian derivative then, according to this question and given Andrew Cashner's experience, you should probably use adduser rather than useradd. According to Andrew:

sudo adduser texlive

or, if you want to use a different user name, such as tladmin

sudo adduser tladmin

is sufficient but notice that this will create an additional directory /home/texlive or /home/tladmin which the useradd method does not. In this case, <username for texlive>'s home will be /home/<username for texlive> and not /usr/local/texlive. Moreover, <username for texlive>'s primary group will depend on the defaults for your system: you might get <username for texlive>:<username for texlive> (e.g. texlive:texlive or tladmin:tladmin) or you might get <username for texlive>:staff (e.g. texlive:staff or tladmin:staff) or <username for texlive>:users (e.g. texlive:users or tladmin:users). You can use

groups <username for texlive>

to discover which group <username for texlive> is assigned to. For example, use

groups texlive

if texlive is the name of the user you added, or

groups tladmin

for tladmin.

If the result includes <username for texlive> (e.g. texlive or tladmin), use this group in what follows. Otherwise, you probably only get a single group listed e.g. users and should use that one. In the following, I'll call this group <group of texlive> and denote the user name you're using by <username for texlive>. If you have not installed from upstream before:

sudo mkdir -p /usr/local/texlive
sudo chown -Rh <username for texlive>:<group of texlive> /usr/local/texlive

If you have installed from upstream before, then just:

sudo chown -Rh <username for texlive>:<group of texlive> /usr/local/texlive

Switch to the new user before installing

Now login as <username for texlive>:

su -l <username for texlive>

Give the password and you will be in <username for texlive>'s home directory. That is, you will be in /usr/local/texlive. (If you used the Debian method above, cd /usr/local/texlive to move from the home directory.)

Now follow Silex's instructions but omit all occurrences of sudo. You don't need them.

Note that this method not only protects your system directories, it also protects your home. The <username for texlive> user cannot write to your normal home directory. So even if somebody screws up and the installer tries to delete all your documents, it will not be allowed to do so. In fact, if you were to get any permissions errors whatsoever, that would be a red flag. The installer is not supposed to touch anything outside /usr/local/texlive at all.

Aftercare: when to use root

You will need sudo to install the fake packages and to integrate TeX Live's fonts into the system configuration. That's because these steps involve system directories. The fake packages get installed for the system and the font configuration involves altering files in /etc. That all necessarily requires root privileges.

Maintenance: updating your installation

When you are ready to update TeX Live, simply login as <username for texlive> prior to running the update:

su -l <username for texlive>
# give the password
tlmgr update --all

Do not use sudo or switch to root. The whole point is that tlmgr runs as an unprivileged user and cannot touch your home or system directories.

In general, if you want to change anything under /usr/local/texlive, su <username for texlive> before you do it. If you want to do something in /etc or under /opt, you need root privileges (sudo or similar).


Loosely related notes

The use of single configuration files in /etc seems to be going out of fashion. If you find that /etc/environment does not set your PATH, it may be somewhere else. For example, on some systems, PATH is set in /etc/profile and should be extended by adding a file named something like /etc/profile.d/texmf.sh for shells such as sh or bash:

# /etc/profile.d/texlive.sh 
if [ $UID != 0 ]
then
        [ -d "<path to binaries>" ] && export PATH="<path to binaries>:${PATH}"
fi

This avoids adding TeX Live binaries automatically to root's PATH. In order to avoid needing to adapt this file when you install a new edition of TeX Live, you can use a system of symbolic links.

cd /usr/local/texlive
ln -s <YYYY>/bin/x86_64-linux bin.<YYYY>
ln -s <YYYY> current.<YYYY>
ln -s bin.<YYYY> bin
ln -s current.<YYYY> current

Then/etc/profile.d/texmf.sh can contain just

# /etc/profile.d/texlive.sh 
if [ $UID != 0 ]
then
        [ -d "/usr/local/texlive/bin" ] && export PATH="/usr/local/texlive/bin:${PATH}"
fi

and PATH will be set to include the current binaries automatically. When you install a new edition of TeX Live, you just add further links (2 per edition) and adjust the current and bin link to point to whichever edition you want to be active. This can all be done as <username for texlive>, with no need for root privileges. (That is, the .sh file in /etc/profile.d must be created with root privileges, but you need not touch this file when installing or activating a new edition of TeX Live.)

Share:
180,941

Related videos on Youtube

Dima
Author by

Dima

Updated on February 12, 2022

Comments

  • Dima
    Dima over 1 year

    Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed.

    So how do I install "vanilla" TeXLive on Debian/Ubuntu?

    Also how do I make dpkg aware that I have TeXLive installed?

    • David Z
      David Z over 13 years
      This might be a better fit for Super User or the Ubuntu SE site, since it's really about the Debian/Ubuntu packaging system, not anything specific to LaTeX.
    • naught101
      naught101 over 11 years
      There's a bug for that: bugs.launchpad.net/ubuntu/+source/texlive-base/+bug/712521 . Looks like it might be time to start thinking about an upgrade to a 12.10 pre-release :)
    • naught101
      naught101 over 11 years
      Ah, there's a PPA for 12.04 too: launchpad.net/~texlive-backports/+archive/ppa. Haven't tried it yet.
    • strpeter
      strpeter over 10 years
      Could you please announce what vanilla is good for? Just because many people like me are using other distributions. I would like to look for a similar package.
    • cmhughes
      cmhughes over 10 years
      The repos can be tweaked, as detailed here: How do I install the latest TeX Live 2012?
    • Admin
      Admin over 10 years
      I successfully installed TeXLive 2013 on Ubuntu 12.04 following silex's answer (thanks for that!). Only problem I encountered was a bunch of not really working CTAN mirrors. You may need to change your default mirror by sudo perl install-tl -repository ftp.fu-berlin.de/tex/CTAN for example.
    • dustin
      dustin over 10 years
      Have you seen the difference in your calling and silex's? Silex's has: sudo apt-get install perl-tk --no-install-recommends which I just checked and it works whereas you have for gone the apt-get and perl-tk. So I think the source of your problem was not using the exact line. Here is the output: dustin@dustin:~$ sudo apt-get install perl-tk --no-install-recommends Reading package lists... Done Building dependency tree Reading state information... Done perl-tk is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • Dima
    Dima over 13 years
    Except that by policy none of the packages depend on the "decent selection packages" e.g. texlive since they are subject to change to something like equivs will be required.
  • Andrew Stacey
    Andrew Stacey over 13 years
    @Dima: I was afraid of that. In that case, I'd go for option 3 with option 2 if you really don't want to install the system version.
  • Jan Hlavacek
    Jan Hlavacek about 13 years
    Ad 2: packages marked as "manually installed" are still regular packages. The difference is that if all packages that depend on them are removed the "manually installed" packages will be kept. In contrast, if all packages that depend on an "automatically installed" package are removed, the package itself will be removed too. By default, manually installed packages are those that you actually select for installation in aptitude, automatically installed are those pulled in as dependencies. You can override this by marking a package as manually or automatically installed. So 2 would not work.
  • Andrew Stacey
    Andrew Stacey about 13 years
    @Jan Hlavecek: Thanks for the clarification. Option 3 seems best, then.
  • Admin
    Admin over 12 years
    See also: tug.org/texlive/debian.html , section "Vanilla TeX Live on Debian" which is also valid for Ubuntu (since Ubuntu is a Debian based distribution)
  • mpg
    mpg over 12 years
    concerning option 3, you don't need to set TEXMFCNF and it is recommended not to set it. Setting the PATH is enough.
  • isomorphismes
    isomorphismes about 12 years
    In bash, does one need to type aptitude install texlive&m or aptitude install texlive\&m?
  • Andrew Stacey
    Andrew Stacey about 12 years
    @Lao: I don't use bash so I don't know. I'm pretty sure that the first won't work, but I don't know about the second.
  • David LeBauer
    David LeBauer almost 12 years
    it seems that access to the English version is restricted to tug members
  • egreg
    egreg almost 12 years
    Yes, as are also the other versions. TUG discloses articles to everybody after one year, IIRC.
  • void-pointer
    void-pointer over 11 years
    I asked a related question here: tex.stackexchange.com/questions/52388/…. If anyone is having trouble installing vanilla texlive, perhaps some information in that post will help.
  • masfenix
    masfenix almost 11 years
    I've installed this succesfully, but I can't for the life of me figure out where the editor texworks is? Its not showing up in my Applications menu
  • Silke
    Silke almost 11 years
    @masfenix: TeXworks is not installed by TeX Live, you need to install it through the software center.
  • Stefan Waldmann
    Stefan Waldmann over 10 years
    @Silex Thanks for the nice howto. Works perfect...
  • Glutanimate
    Glutanimate over 10 years
    Thank you for these instructions. They were a life-saver. I wouldn't regard the installation as hard but wouldn't regard it as easy, either...
  • Rasoul
    Rasoul over 10 years
    How can I install extra packages such as texlive-publishers, on /usr/local/texlive/2013/?
  • Silke
    Silke over 10 years
    @Rasoul: most CTAN packages included in texlive-publishers (list) are installed with texlive. Missing CTAN packages can be installed trough the TeX Live Manager.
  • Rasoul
    Rasoul over 10 years
    @Silex: When I try to install texlive-publishers with the command tlmgr install texlive-publishers I receive the error You don't have permission to change the installation in any way, and if I do sudo tlmgr install texlive-publishers I receive the error sudo: tlmgr: command not found. I use Ubuntu 12.04 if it does matter.
  • Silke
    Silke over 10 years
    @Rasoul: there is a difference between Ubuntu packages (from the Ubuntu repository) and CTAN packages (from CTAN). The latter is what you want. The Ubuntu texlive-publishers package can't be installed because you are running vanilla TeX Live. But as texlive-publishers is actually a collection of CTAN packages you can install those (if they haven't been installed already). If you have issues, please ask me in the chat to avoid extended discussion in the comments.
  • Martin - マーチン
    Martin - マーチン almost 10 years
    The example-link for building the package texlive-local ist outdated: tug.org/texlive/files/debian-equivs-2013-ex.txt should work instead.
  • someonr
    someonr almost 10 years
    Wouldn't it be easier to select (in the installer) options->create symlinks in standard directories to create symlinks to the default directories /usr/local/bin, /usr/local/man, /usr/local/info? That way you won't have to do any manual linking.
  • texenthusiast
    texenthusiast almost 10 years
    texdoc,tlmgr which get's automatic updates for all new packages will be missing with 2012 backports and even distro specific latex packages are very old and cannot updated with tlmgr. Hence vanilla texlive installation is the way to do for taking advantage of full power of texlive distro and being latest.
  • Canageek
    Canageek almost 10 years
    @texenthusiast Ah, I didn't know that. Looking at the changelog once you get the newest version of ubuntu they are keeping the package up to date at least. Should I delete my answer?
  • texenthusiast
    texenthusiast almost 10 years
    actually backports was mentioned by naught101 user in comments. So I think backports is not too much advisable compared to the vanilla install if possible sorry to say delete the answer. But some people prefer to be with ubuntu's ppa also instead of being over latest. finally take your decision.
  • ramgorur
    ramgorur over 9 years
    @Silex: I have faked the tex installation for Ubuntu as described in your answer. But when I tried to install a dviware package like "catdvi", still the synaptic-package-manager tries to download and install tex-common, texlive-binaries and texlive-common. Although these packages are included in the "Provides:" entry of the equivs script (texlive-local). Any idea?
  • Swagatika
    Swagatika over 9 years
    Hi, just a small thing to point, in the texlive-local file, we need to explicitly set Package: texlive-local, otherwise I get error in the next step.
  • cfr
    cfr over 9 years
    I realise this is how most people proceed but upstream are quite explicit in recommending that TeX Live not be installed with root privileges. (And it works beautifully if you follow their advice and do not do so!)
  • radek
    radek over 9 years
    Many many thanks for that. I updated Ubuntu to 14.04 and that broke the LaTeX completely on my machine. 'Usual' instillation didn't work but your script worked like a charm. One question though. I downloaded install-tl-ubuntu to my home directory. After installation was complete it left behind some folders: install-tl-20140417, debian-control-texlive-in.txt, install-tl-1.log, install-tl-ubuntu_EXTRAS.log, install-tl-unx.tar.gz, mirrorCandidates.logand mirrorWgets.log. Can they all/some be deleted?
  • scottkosty
    scottkosty over 9 years
    @radek Glad it was useful. You do not need those files anymore.
  • Clément
    Clément over 9 years
    For those wondering, /etc/environment should be replaced by /etc/login.defs when dealing with Debian, according to tug.org. In this file you can edit your path.
  • mmdanziger
    mmdanziger about 9 years
    For the record, this is one of the best answers on the entire SE network.
  • cfr
    cfr almost 9 years
    @scottkosty Looks very nice! (I don't use Ubuntu/Debian, though.) Can you run it as a non-root user, as upstream recommends? Even better, could you have it create a non-root user to manage the installation and then proceed as that user? (So the user would also then be used for subsequent updates etc.)
  • Mario S. E.
    Mario S. E. almost 9 years
    I can't create the /opt/texbin symbolic link. It says there is no such file or directory. I have checked and I indeed have the /usr/local/texlive/2014/bin directory, but I don't even have a /opt folder
  • Silke
    Silke almost 9 years
    @MarioS.E.: In that case you can create it: sudo mkdir /opt.
  • I Like to Code
    I Like to Code over 8 years
    This works perfectly for me, except the step when I am supposed to change /etc/environment. Editing the /etc/environment file doesn't work. But editing the ~/.bashrc file works.
  • Thérèse
    Thérèse over 8 years
    This is an excellent suggestion. I’ve often been tempted to install TeX Live as root because some editors (Emacs, for one) open .sty files upon compilation errors, and then I’m in danger of modifying the files without noticing what I’m doing (absent-minded). This approach prevents that as well as protecting /home.
  • cfr
    cfr over 8 years
    @Thérèse Thanks. That's a good point. My editor tends to do that too. I've never installed TL as myself I went from root to a special user. But it is definitely another good reason to keep a separate account. It also means if there's anything of your own you don't want to touch, you can stick it in TEXMFLOCAL which is managed by the dedicated user as well. (At least, using the above instructions it ends up that way.) This method is really, really easy to use. It really is just creating a new user with a special home and setting it up that is a little fiddly. But you only do that once....
  • musarithmia
    musarithmia about 8 years
    I installed TeXLive per your instructions on Debian, but with useradd I ended up with a fairly crippled user account for the texlive user. In particular, I was unable to set the path, which meant I couldn't use tlmgr. I tried again using the newer utility adduser (simply adduser texlive with no additional options required) and everything worked better. The only thing I had to do as root was create a /usr/local/texlive directory and chown texlive:texlive /usr/local/texlive so that the texlive user could install there.
  • musarithmia
    musarithmia about 8 years
    On adduser vs. useradd, see unix.stackexchange.com/questions/182180/…
  • cfr
    cfr about 8 years
    @AndrewCashner The thing is, adduser is distro-specific. Some distros do not provide such a wrapper at all (e.g. mine). I'll see if anything about useradd has changed, though. Thanks for the heads up. Strange that useradd would be crippled on Debian. As I say, adduser is not generally available.
  • cfr
    cfr about 8 years
    @AndrewCashner I've updated in light of your comments. Unfortunately, I cannot test this personally as my system does not have the adduser wrapper. The answer there which claims useradd is 'deprecated` is wrong, at least as a general claim. adduser is just a Debian wrapper around useradd as far as I know. In any case, adduser is not a generic GNU/Linux command and clearly is not deprecated on other systems. (I realise this question asked about Debian/Ubuntu specifically, but it is the only question on this so it seems reasonable to include information for other distros.)
  • musarithmia
    musarithmia about 8 years
    @cfr Just to clarify: If you use adduser the system will take care of setting up the home folder (which, as you say, is /home/texlive) with suitable .profile and other defaults. Then you still have to create the texlive folder and give its ownership to texlive by doing sudo mkdir /usr/local/texlive && chown texlive:texlive /usr/local/texlive. After that you can login as texlive and do the installation.
  • Yossi Gil
    Yossi Gil almost 8 years
    I added more detailed instructions on how to manage /etc/environment.
  • Yorgos
    Yorgos almost 8 years
    I would like to change the icon of tl-manager. I went to gksudo nautilus and then at /usr/share/applications and i changed the icon and i logged out However, it didn't has an effect
  • Arch Stanton
    Arch Stanton almost 8 years
    I can't make texlua install-getnonfreefonts work. When I installed TeX Live 2015 following the instructions on tug.org it worked (no \opt stuff, PATHs written in .bashrc), but I didn't know how to install TeXworks correctly. Now when I run texlua install-getnonfreefonts as root (after sudo -s) i get: The program 'texlua' is currently not installed. You can install it by typing: apt-get install luatex. Should I do it or would it be duplicated? Note: Running sudo texlua install-getnonfreefonts results in sudo: texlua: command not found. texlua -v shows the credits.
  • Arch Stanton
    Arch Stanton almost 8 years
    Solved. Use sudo su instead of sudo -s to become root before running texlua install-getnonfreefonts.
  • scottkosty
    scottkosty almost 8 years
    @cfr (I'm sincerely sorry for the very late reply, not sure how I missed this). No, unfortunately it cannot be run as non-root. I think this would be nice (and even recommended, as you say). Patches are welcome :)
  • cfr
    cfr almost 8 years
    @scottkosty Not exactly a patch, but I have written instructions in supplemental answer here. This includes coverage for Debian/Ubuntu, although I can't test that myself. (But somebody else helped with this bit, as you'll see from the comments.)
  • cfr
    cfr almost 8 years
    I don't know exactly what you've done, but that is probably not the best way to allow Ubuntu-installed TeX stuff to be used. The best is to add it as an additional tree. (I asked a question about how this should best be handled a while back, and this was the answer I got from, I think, Norbert, if I remember correctly. I regard that as definitive for TeX Live in the absence of protestations to the contrary from one of the other developers.)
  • cfr
    cfr almost 8 years
    Also, if you do not test to ensure that you are on a system you wrote the script for, I think you should. Yes, people should read what it says on the tin. But, no, people won't necessarily even realise it is a tin. ;)
  • Marco
    Marco almost 8 years
    @egreg I have a question about perl-tk. In your guide you state to install it using Synaptic. Silke, in his answer above, says to write sudo apt-get install perl-tk --no-install-recommends. I wanted to know if it is the same thing.
  • egreg
    egreg almost 8 years
    @Marco Yes, that should be the same, as Synaptic is an interface to apt.
  • Sandeep
    Sandeep over 7 years
    On fedora, there is no equivs. I am not sure what is the equivalent of equivs. If the gui complains then one needs to install perl/Tk. What is with different names for same package across distributions?
  • Erel Segal-Halevi
    Erel Segal-Halevi over 7 years
    The readme in github says that the current version "TeX Live 2016". Is there also support for Ubuntu 16.04?
  • scottkosty
    scottkosty over 7 years
    @ErelSegal-Halevi I have heard from many Ubuntu 16.04 users that install-tl-ubuntu works well. I have also used it on a few Ubuntu 16.04 installations and it works smoothly for me. There might be a warning that 16.04 isn't yet "officially" supported but that's just because I haven't gotten around to confirming and tweaking the TeX Live -> Ubuntu package mappings for 16.04. But again, I have not heard about a single problem specific to Ubuntu 16.04. If you happen to use the --hebrew option of install-tl-ubuntu, I'd be interested in hearing from you regarding whether it works well.
  • Erel Segal-Halevi
    Erel Segal-Halevi over 7 years
    I did install-tl-ubuntu --hebrew --more-tex on Ubuntu 16.04. So far it works well. I managed to compile this Hebrew document: cs.bgu.ac.il/~yoavg/tech-notes/heblatex/hebexample.tex well. Thank you very much for this useful script!
  • scottkosty
    scottkosty over 7 years
    @ErelSegal-Halevi great! Thanks for confirming. Note (just in case you are curious) that we also have a couple of LyX Hebrew manuals. See /usr/share/lyx/doc/he/Intro.lyx and /usr/share/lyx/doc/he/Tutorial.lyx
  • luchonacho
    luchonacho about 7 years
    @Silke It's time to update this for Ubuntu 16.04!
  • cfr
    cfr about 7 years
    Binaries installed in /usr/local/texlive/... should be sym linked from /usr/local/bin, if anywhere, and not from /opt. Different distros use /opt in different ways, but I don't know any which would recommend this. (Unless Ubuntu does something really bonkers. Maybe it does.)
  • Ur Ya'ar
    Ur Ya'ar about 7 years
    @scottkosty I am also now trying your script for use in Hebrew on 16.04 (I only added the --hebrew option). Basically the Hebrew works, but your script does not install the culmus-latex package (guyrutenberg.com/culmus-latex) which, as far as I understand it, is needed in order to use the entire variety of the culmus fonts, as well as the Nikud. This is, of course, unless you use XeTeX. I also did not manage to install it using tlmgr as it is not in the repository, nor by the instructions provided by the package. Anyway, thanks for the script!
  • scottkosty
    scottkosty about 7 years
    @UrBen-Ari-Tishler thanks for this feedback. It is good to know that the Hebrew works (in fact, I just tested with a 40 page non-trivial Hebrew document and pdfTeX compiles it well). I know nothing of Hebrew or fonts, but if you are interested in helping me incorporate a wider variety of Hebrew fonts, please open an issue on the install-tl-ubuntu github page and we can work together to improve things. I'd appreciate your feedback.
  • Ur Ya'ar
    Ur Ya'ar about 7 years
    @scottkosty I opened an issue. But I'm not a programmer, and rather new to Linux, so I don't think I can help with the technical side of things...
  • scottkosty
    scottkosty about 7 years
    @UrBen-Ari-Tishler well together we make one Hebrew-speaking programmer so we will figure it out :). I promise I will take a look at the Github issue but not sure exactly when that will happen. For archival purposes (e.g. in case other Hebrew users happen along these comments and want to follow the progress or give input), the github issue is here: github.com/scottkosty/install-tl-ubuntu/issues/27
  • Zach
    Zach about 7 years
    I tried running the script, but it would restart repeatedly (11 times) and then abort. When I checked the log file, I'm getting a 404 not found on "mirror.utexas.edu/ctan//install-tl-unx.tar.gz". Is there anything I can do to fix this?
  • scottkosty
    scottkosty about 7 years
    @Zach can you open an issue on the github repo? One solution might be for you to manually select a repository using the --repository option. See the output of install-tl-ubuntu --help.
  • cfr
    cfr almost 7 years
    (3) spells trouble and confusion, in my opinion. I really wouldn't recommend it. I'm sure you know what you are doing and can avoid the pitfalls, but for mere mortals it is fraught with danger.
  • I Like to Code
    I Like to Code over 6 years
    I got the error ` texlive-local depends on freeglut3; however: Package freeglut3 is not installed.` when I was trying to run the command ` equivs-build texlive-local`. Maybe you should add freeglut3 to the list of packages required?
  • Silke
    Silke over 6 years
    @ILiketoCode: maybe, but theses dependencies might change. I recommend doing an apt install -f after installation of the faked package.
  • Jonathan Y.
    Jonathan Y. over 6 years
    I would suggest setting null shell for user texlive (/bin/false or /bin/nologin), then using tlmgr with sudo -u texlive tlmgr. If $PATH isn't properly set, sudo env PATH="$PATH" /usr/local/texlive/2017/bin/x86_64-linux/tlmgr path add should sort that out (use 20XX according to your version).
  • cfr
    cfr over 6 years
    @JonathanY. Not all Linux distros have sudo by default. And I don't honestly see any reason for adding this complication. Moreover, sudo is complicated in various ways and its configuration is highly system and distro dependent, so it is difficult to give instructions. But what is the advantage? I realise it means somebody can't log in as texlive, but I don't see any particular benefit in that. Note that part of the point of my post is that you don't need to specify the 20XX in the path.
  • Jonathan Y.
    Jonathan Y. over 6 years
    Well the answer calls sudo several times as it is; the advantage is what you say, but I disagree on the benefit: setting a separate password adds an attack vector plus the potential to lose it / cost to remember it. You could make it random, and use sudo to reset it every time you use tlmgr (which shouldn't be often), but what's the point? Also, setting $PATH a single time is comparable to installing fake packages -- there's no added cost here.
  • Jonathan Y.
    Jonathan Y. over 6 years
    I'm sorry, if you mean that the work user needn't set their $PATH to include the correct directory in /usr/local/texlive, then I missed that. How so?
  • cfr
    cfr over 6 years
    I use tlmgr often. I don't know why you claim I 'shouldn't'. Anyone on a system without sudo will translate the above appropriately. (I doubt I used sudo where I've given it above, but this is primarily a Debian/Ubuntu question, so I gave the code that way here.) The texlive account has fewer privileges than my regular user account. I can easily reset the password if I need to. I don't see any significant increase in risk from managing the installation directly as texlive, which greatly simplifies things. Your last comment is correct, though. (But I seem to have presupposed it....)
  • cfr
    cfr over 6 years
    @JonathanY. Thanks for pointing out the omission. Please see edit above. Note, too, that even if you rarely use tlmgr, you may well need to manage TEXMFLOCAL, which is much more conveniently done by a user who can log in than by one who cannot. Of course, you can manage without this, but it complicates things significantly. Even if all you want to do is install the non-free fonts, it is easier to do it this way. I also think that there is less danger of accidentally modifying the contents of /usr/local/texlive as root this way. You can set up a distinctive prompt for the texliveuser.
  • Jonathan Y.
    Jonathan Y. over 6 years
    An unrelated follow-up question on this post: does this setup offer any mitigating factor to the risk (to one's home directory, among other things) presented by running texlive executables (which, presumably, most do with their own user)? Even if we authenticate an image as signed by the tl team, does tlmgr use any cryptography to authenticate updates? Can one easily set up a process that compiles Tex sources as the unprivileged user?
  • cfr
    cfr over 6 years
    @JonathanY. No. This offers no additional protection when using TeX Live. It only protects you while installing and updating/maintaining it. If you install malicious binaries, then you are in trouble. However, note that this would require something like pdfTeX itself to be altered, because TeX will not usually allow either arbitrary command execution or changes above the working directory. By default. You can change it to be either stricter or less strict.
  • cfr
    cfr over 6 years
    @JonathanY. For installation/updates, checksums are checked and the checksum list is verified. However, if verification fails, installation continues by default. This can be disabled or enforced using custom options. See tlmgr's manual page for details.
  • gusbrs
    gusbrs over 6 years
    @cfr, interesting approach. But, a practical question, do you consider TeXLive (or CTAN for that sake) as being riskier than, e.g., Ubuntu or Debian standard repositories?
  • cfr
    cfr over 6 years
    @gusbrs Yes. But that's not really the point. The point is the general principle of not doing things with higher privileges than necessary. There's a reason I don't write my TeX documents as root: it is entirely unnecessary. Note that when you install programmes from your distro's repositories, installation scripts may well drop privileges for the sake of security. Neither the TeX Live installer nor tlmgr drops privileges. If you run them as root, they do everything as root.
  • cfr
    cfr over 6 years
    @gusbrs It is left to the user to follow TeX Live's own advice or not, just as it is left to you whether to run other things as advised or not. It isn't a question of the repos being riskier or not. It is a question of it being riskier to ignore upstream's advice. Upstream advise installing without privileges. This is the only sensible advice: privileges are entirely unnecessary, therefore they should not be used. This is a basic strategy: don't do anything with more privileges than necessary. If you must run something as root, drop privileges as soon as possible.
  • cfr
    cfr over 6 years
    @gusbrs In one sense, of course CTAN and TL are riskier than Debian/Ubuntu standard repositories. CTAN does not scrutinise the packages uploaded. TL does not scrutinise them either. They would not accept anything obviously malicious or obviously inadvertently problematic, but there is no active scrutiny. In another sense, of course the standard repos are riskier because they are the source of software with far more potential for damage. So which kind of risk are you asking about?
  • cfr
    cfr over 6 years
    @gusbrs You can actually convert your installation to a ownership by a non-privileged user. If you do that, you can run tlmgr without privileges. Basically, create the new user and then run, say chown -Rh texlive:texlive /usr/local/texlive as root or with sudo. Then manage the installation as texlive.
  • gusbrs
    gusbrs over 6 years
    @cfr, actually I hadn't taken the thought that deep. I was just thinking of the installation of a regular program trough the repos, let's say texlive itself. But you are correct in pointing the two kinds of risk.
  • gusbrs
    gusbrs over 6 years
    @cfr, I've been trying this out, and have a small suggestion. In the update section (at least in my settings) if I use su texlive the path is not set appropriately. For that, I have to use su -l texlive, with which I get the environment variables also set. (I did not set TeXLive paths globally, but trough /etc/profile.d).
  • cfr
    cfr over 6 years
    @gusbrs What do you mean by not setting them globally? If you set them in /etc/profile.d, they should be set for all users.
  • cfr
    cfr over 6 years
    @gusbrs Thanks for the suggestion about su -l. I've added that even though I'm not sure why it is needed on some systems, because I don't think it will hurt anything even where it is not needed.
  • gusbrs
    gusbrs over 6 years
    @cfr, I mean I haven't set the path in /etc/environment, but I guess my terms were not adequate, given that /etc/profile.d indeed sets it for all users.
  • gusbrs
    gusbrs over 6 years
    @cfr, I'm working within a somewhat common environment: Linux Mint 18.2, which is akin to Ubuntu 16.04. What happened is that, setting the path with /etc/profile.d and changing users with su texlive the path did not come along. I really cannot tell you why. If I logged out and then logged in as texlive, it did work fine. Resorting to su -l sorted out the issue for me.
  • cfr
    cfr over 6 years
    I set it in /etc/profile.d, too. But I'm on a different system and different systems will configure things differently. (Actually, 2 systems, but they are both different.)
  • gusbrs
    gusbrs over 6 years
    @cfr, if you have comments or repairs, I'm all ears.
  • Arch Stanton
    Arch Stanton over 6 years
    which tex in my machine answers /usr/local/texlive/2017/bin/x86_64-linux/tex. Did I have to set a path for symlinks in the installation options?
  • nutty about natty
    nutty about natty about 6 years
    A minor suggestion / request: to help differentiate between the actual TeXLive and the "artificial / workaround" user texlive, could you perhaps rename the user in your guidelines above to, for instance texalive ?
  • nutty about natty
    nutty about natty about 6 years
    Or, will it not work if the username is anything but texlive ?
  • nutty about natty
    nutty about natty about 6 years
    Here's what I did in the end: username texalive but in the mkdir and chown lines kept /usr/local/texlive.
  • nutty about natty
    nutty about natty about 6 years
    Help needed: which tex returned /usr/local/texlive/....... alright while "logged in" to the texalive user in terminal, then typed exit and hit enter and which tex no longer returned anything, also not upon logging back in to texalive. What am I missing?!
  • nutty about natty
    nutty about natty about 6 years
    PS: am testing this on a virtual machine first and I took a snapshot right after the installation completed and I updated the PATH's, so I can always return to the machine state where which tex still worked.
  • nutty about natty
    nutty about natty about 6 years
    Thanks for that! -- Any idea why the successful installation (as evidenced by which tex) could have gone missing (?) - no response to which tex - upon executing an exit command (which here roughly triggers a change of user from tladmin back to the original user), for example, in the very same shell/command line instance in my more recent comment/question?
  • nutty about natty
    nutty about natty about 6 years
    which tex also returns nothing if (from the virtual machine state freshly after the successful install) I switch with su main-user to the main-user (and also does not return when I switch back again with su tladmin to the "texlive" user).
  • nutty about natty
    nutty about natty about 6 years
    Ok, I thought I managed to solve it (or at least find a viable workaround), but apparently not quite yet: if I execute the three export commands again (e.g. not as tladmin but as the main/normal user), which tex, man tex, etc work. However, if I close that terminal and start a new one, things are reset and I need to export again. What am I doing wrong(ly)?
  • nutty about natty
    nutty about natty about 6 years
    SOLVED, I think. Added the three lines to $HOME/.profile of the main/normal user (cf., for instance, tug.org/texlive/doc/texlive-en/texlive-en.html#x1-310003.4.1‌​). Saved. Logged-out-and-back-in. which tex works.
  • cfr
    cfr about 6 years
    @nuttyaboutnatty You should be able to set those system-wide, as I did, in /etc. However, exactly what you need to change in /etc is system-dependent. For me, it means adding a new file in /etc/profile.d but, for you, it might require something different. It depends how your Linux distro configures PATH. You should not set MANPATH etc. on any recent distro of which I'm aware - only PATH. However, changes in /etc won't take effect until your next login. (I don't know what that means on a virtual machine.)
  • Martin - マーチン
    Martin - マーチン about 6 years
    The check for 'normal' users in the profile script if [ `whoami` != "root" ]; then ... fi should rather be checking which user id is used, i.e. if (( $EUID == 0 )); then ... fi (requires bash). This is more portable and more secure as the su is not always called root, but it has always 0 as id.
  • cfr
    cfr about 6 years
    @Martin-マーチン What's the difference between EUID and UID? Is EUID available everywhere UID is?
  • cfr
    cfr about 6 years
    @Martin-マーチン I guess $UID would be better since EUID is newer and I'm not clear whether it is supported everywhere. (E.g. long-term support editions of RHEL etc., BSD etc.) So maybe if [ $UID != 0 ]; then ... fi ...
  • Martin - マーチン
    Martin - マーチン about 6 years
    @cfr I am not 100% sure right now, my Linux knowledge is very dependable on my notes. I remember looking it up and that it is now the recommended practice. It should be available in the new kernels, and since we're talking about installing the latest texlive version, we can assume that the user had an reasonably updated system. It certainly works on Centos, Ubuntu, and I think I tried it on Suse. Whoami is not a good idea, because that's a script calling the $USER variable and not a shell native. That basically defeats the purpose of portability you are trying to achieve.
  • cfr
    cfr about 6 years
    @Martin-マーチン I agree about whoami. I've edited above to use UID instead. UID is available on BSD-like systems and will be in RHEL, whereas I'm not certain about EUID, which only seems to have been introduced to POSIX circa 2013. There's no guarantee that a new TL means a new OS. One reason people install vanilla TL is precisely that their distro's packages supply only a very outdated version. So, if anything, this is more likely relevant to people on older systems.
  • Martin - マーチン
    Martin - マーチン about 6 years
    And one more things I noticed. You don't necessarily have to install it in /usr/local/, it works everywhere. You can keep your installation completely local. I do it that way, because I'm using this approach for many other programs I need to install. As long as every user can read and X it, it's fine. You can go a bit further and simply add the users who should be allowed to use it to a group. Then you can get rid of the world permissions currently necessary.
  • cfr
    cfr about 6 years
    @Martin-マーチン Yes, you can. But it makes things much easier not to do that. People who understand their systems well enough to cope with the additional complications do not need my step-by-step instructions. There isn't actually any security reason not to have world permissions, really. At least, no reason that doesn't apply to every other programme. And there is no security advantage to avoiding /usr/local.
  • Arch Stanton
    Arch Stanton about 6 years
    Sorry for the inappropriate edit. I thought you could review it before it was acceppted.
  • cfr
    cfr about 6 years
    @ArchStanton I didn't even know you'd edited this answer.
  • cfr
    cfr about 6 years
    @ArchStanton I'm not sure if I saw it or not, actually, but don't worry about it. I just put a banner up to (try to) stop people keep editing it in ways that make it much more distro- or distro-version specific. If people leave me a comment, I can figure out whether I need a 'if you have X, do Y, but if you have A, do B' or whatever. This is how the adding-new-user stuff turned out to go, whereas if it had just been 'updated', it wouldn't have worked on other systems (including mine!). Different distros and different installations of the same distro can be very, very different.
  • alhelal
    alhelal about 6 years
    @Silke I have installed texlive-2016 long days ago. A few days ago when I installed updates in my Ubuntu 14.04 texlive-base was also installed. How can I remove texlive-base ubuntu repo packages? my question is here.
  • Silke
    Silke about 6 years
    @BandaMuhammadAlHelal Make sure your paths are correct (under TeX Live Installer) and follow the instructions from 'Fake Packages'. Uninstall all packages provided by the equivs file.
  • alhelal
    alhelal about 6 years
    @Silke it might be helpful if you would edit your answer so that who has installed the texlive and now want to tell to dpkg that he install texlive like me can use your answer.
  • alhelal
    alhelal about 6 years
    @Silke I follow the instructions from "Fake Packages". but error occurred.pastebin.ubuntu.com/25533616
  • alhelal
    alhelal about 6 years
    @Silke dpkg error is solved. now see this
  • fkraiem
    fkraiem about 6 years
    Using sudo will be unnecessary, and therefore discouraged, for the vast majority of users, who can just install into their home directory. Installing into /usr/local may make sense if several users on the system want to use it (and even then, I wouldn't do it).
  • jmjr
    jmjr over 5 years
    Had a problem with PATH. export commands didn't work. This post involving RStudio solved the problem for me.
  • Arch Stanton
    Arch Stanton over 5 years
    Out of curiosity, what's the use of the comment in /etc/profile.d/texmf.sh?
  • cfr
    cfr over 5 years
    @ArchStanton I just put it here when writing the answer so that the name of the file is tied as closely as possible to the content. I don't have it in /etc/profile.d/cfr_texlive.sh on my system, which is the equivalent.
  • Arch Stanton
    Arch Stanton over 5 years
    Thanks. I asked because I saw other files in /etc/profile.d/ with their full name in the first line as a comment. I thought it was to distinguish them if they are concatenated.
  • cfr
    cfr over 5 years
    @ArchStanton Well, that too. Lots of files have this just for tracking, I think. If a file ends up in the wrong place it can tell you where home is. A bit like teaching small children their addresses.
  • gusbrs
    gusbrs over 5 years
    @Silke gksu has been dropped from Debian, Ubuntu 18.04 and Mint 19 (e.g. forums.linuxmint.com/viewtopic.php?t=268140). So, probably, some update for the launcher is required.
  • Leonid
    Leonid almost 5 years
    pkexec env PATH=$PATH DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY tlmgr gui this can be one of replacements to gksu containing line I think (more ideas at discussion itsfoss.com/gksu-replacement-ubuntu/#comments/292236)
  • PlasmaBinturong
    PlasmaBinturong over 4 years
    Is it bad to not remove the texlive from apt before doing this?
  • Arch Stanton
    Arch Stanton over 4 years
    I have just installed TL2019 on a Fedora 30 box. I had to run sudo chmod 755 /usr/local/texlive/ in order to have [ -d /usr/local/texlive/2019/bin/x86_64-linux ] return true (which tex was failing because the test in /etc/profile.d/texlive.sh returned false). /usr/local/texlive/ only had rwx------ permissions, while every other directory in /usr/local/ had drwxr-xr-x permissions (755 in octal).
  • Davislor
    Davislor over 3 years
    I did something similar to this, but installed as a different user, instead of root. If you use tex, for example, you would chown tex:tex /usr/local/texlive/, then use sudo -u tex -g tex instead of sudo on all commands, including the installers. So, you might want to alias sudo -u tex -g tex ${which tlmgr} update --self --all. This is useful because exploits in installers don’t have root and can only mess with your TeX installation.
  • Davislor
    Davislor over 3 years
    @PlasmaBinturong Theoretically, it’s fine, so long as your paths are set up correctly so that all users are running the correct binaries.
  • luchonacho
    luchonacho almost 3 years
    Can't make the desktop launcher to work. gedit does not seem to support options d, s and D.
  • raf
    raf over 2 years
    I followed it for installing Texlive 2021 in ubuntu 20.04 LTS. But sudo tlmgr update --self is not working. While giving the full path, like: sudo /usr/local/texlive/2021/bin/x86_64-linux/tlmgr update --self, then it's working.
  • Christoph Thiede
    Christoph Thiede about 2 years
    Great guide, but unfortunately, it does not seem to work on WSL. equivs-build says: "fakeroot, while creating message channels: Function not implemented" Seems as if I need to stay at my old version from 2017 ...
  • Tobard
    Tobard almost 2 years
    @raf : use sudo env PATH="$PATH" tlmgr --gui then in Actions, you can update the symbolic links. Solution found in this message : askubuntu.com/a/137836/376526