Score:1

Installation of TexLive 2021 problems

Well I am afraid that it is duplicate question but I have searched over 8 posts and haven't succeeded. I tried to install in Ubuntu 18.04 TexLive 2021/TL2021 (I am using texstudio). I had previously unsuccessfully downloaded TL2021 but continued using TL2017. I did exactly the following steps:

In terminal

sudo apt autoremove --purge texlive tex-common
 rm -rf /usr/local/texlive/2021
rm -rf ~/.texlive2021
 rm -rf ~/.texlive2017

Deleted manually from the file's manager any files relative to TL2017 (I don't remember the exact names, but they were like texlive2017)

Downloaded the tar.gz file from the TUG site and (tried) to follow the instuctions.

Changed directory (from terminal) where the unzipped install-tl perl file was.

Executed perl install-tl (didn't work), so I executed sudo perl install-tl (maybe it was an unsafe choice)

Entered code and -i option. (After 2 hours approximately that the packages were downloaded and because I thought they were commands)

PATH=/usr/local/texlive/2021/bin/x86_64-linux
 MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man
INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/info

(didn't give output) Found the .profile file and while it was

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH= PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"

fi

I changed it to

# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
    . "$HOME/.bashrc"
    fi
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="/usr/local/texlive/2021/bin/x86_64-linux:$PATH; export PATH"
INFOPATH="$INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/info; export INFOPATH"
MANPATH="$MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man; export MANPATH"
fi
#OLD ONE
#    PATH="$HOME/bin:$PATH"

#PATH=/usr/local/texlive/2021/bin/x86_64-linux:$PATH; export PATH
#INFOPATH=$INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/info; export INFOPATH
#MANPATH=$MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man; export MANPATH
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="/usr/local/texlive/2021/bin/x86_64-linux:$PATH"
INFOPATH="$INFOPATH=/usr/local/texlive/2021/texmf-dist/doc/info; export INFOPATH"
MANPATH="$MANPATH=/usr/local/texlive/2021/texmf-dist/doc/man; export MANPATH"
fi
#OLD ONE
#    PATH="$HOME/.local/bin:$PATH"

Maybe it is wrong. I don't know. From searching on this posts 1,2,3,4,5,6,7,8,9,10, I tried the following

which tex
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
echo $PATH
 whereis pdftex

None of them gave a result. So I am a little bit confused. What did I do wrong or what didn't I do? Texstudio can't compile any tex file now.

cn flag
Ray
You're using Ubuntu 18.04? Is there any reason why you can't (1) use the texlive version that goes with Ubuntu 18.04 or (2) upgrade your version of Ubuntu to a later version? Either option will mean you don't need to install Texlive from source, which quite frankly, can be quite complicated.
I won't upgrade Ubuntu soon, because at the moment I have exams. I had also [this](https://tex.stackexchange.com/questions/630361/names-of-the-files-using-subfiles-package?noredirect=1#comment1572100_630361) problem. Before I was told that the installation of TL2021 won't work, I tried to install it. I will probably go back to TL2017, but maybe it is good to know for next time. I will definetely need it.
N0rbert avatar
zw flag
Do you consider using DockerTex from https://github.com/raabf/dockertex ? Who forced you to use TL2021?
@N0rbert Well if it is safe and find somewhere how to install it I will think about it.
@N0rbert Nobody forced me, but now I have a problem. Myself, I don't know that many things about tex or ubuntu, so I thought that the previous problem I had could get solved with an upgrade.
cn flag
Ray
Installing from source is safe, but if you "don't know many things about tex or ubuntu", then I would suggest you stick to the package that comes with your version of Ubuntu. I like to say I know some things about tex and Ubuntu, but I still wouldn't venture into installing from source unless I absolutely have to (and I rarely do).
Ok, but is it enough to execute `sudo apt-get install texlive-full` or I have to do more than that? I completely deleted everything relative to TL2017@Ray
Ok. I removed everything from older version using [this](https://tex.stackexchange.com/a/95502/248968) answer and then executed `sudo apt-get install texlive-full`. This installed TL2017, not TL2021 for anyone who may wonder in the future.
gernot avatar
us flag
I routinely install vanilla texlive under Ubuntu, to be uptodate with TeX. The easiest way seems to be: remove any tex related packages of Ubuntu, download the texlive installation script, and install it systemwide (with root privileges), below `/usr/local`. The binaries will be linked into `/usr/local/bin`, which should be on the command path anyway, so you are done. Otherwise you may add the PATH extensions of your post *at the end* of `.bashrc`, `.profile` etc, depending on the shell you are using. See section "Integrating vanilla tex live with debian' at https://tug.org/texlive/debian.html
gernot avatar
us flag
If you do `echo $PATH`, then you should see the directory containing the texlive binaries in the list, either `/usr/local/bin` or `/usr/local/texlive/2021/bin/x86_64-linux`. Then, `which tex` should give the fully qualified path to the binary.
@gernot I have seen in posts that there is a risk when I install TL with root privileges.
gernot avatar
us flag
@ΝικολέταΣεβαστού Which one, except that you have to trust the people packaging TeXLive, like with every other package that you install?
@gernot well I have seen [this](https://tex.stackexchange.com/a/187379/248968).
gernot avatar
us flag
@ΝικολέταΣεβαστού The author of the other post is basically right. If you add a separate user for texlive that owns /usr/local/texlive, and install texlive as this user, then this is the best solution.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.