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.
sudo apt-get install texlive-full
or I have to do more than that? I completely deleted everything relative to TL2017@Ray – Νικολέτα Σεβαστού Jan 19 '22 at 14:12sudo apt-get install texlive-full
. This installed TL2017, not TL2021 for anyone who may wonder in the future. – Νικολέτα Σεβαστού Jan 22 '22 at 12:29/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 Jan 22 '22 at 15:19echo $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 Jan 22 '22 at 15:31