[Tex/LaTex] tlmgr unknown directive error with upstream Tex Live 2016

linuxpackages

I have installed Tex Live 2016 following the instructions from the tex live quick install instruction for linux, running the install-tl installer. I am on Linux Mint 17.3.

Trying to use tlmgr, I got the "Unknown directive…" error and followed what is said here: https://www.tug.org/texlive/tlmgr.html. But
executing update-tlmgr-latest.sh gives the following error message:

Verifying archive integrity... All good.
Uncompressing TeX Live Manager Updater............................................................................................................................................................................
./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
./runme.sh: Please set your PATH as needed, otherwise it's hopeless.

I am pretty sure my PATH variables are ok. I edited the ~/.profile
file and made sure to log out and back in. I added

export PATH="$PATH:/home/myusername/texlive/2016" (the tex live directory)

I also tried to add

export PATH="$PATH:/usr/bin" (tlmgr directory)
export PATH="$PATH:/home/myusername/texlive/2016/bin/x86_64-linux"

When I run tlmgr –version in the command line, I get:
(running on Debian, switching to user mode!)

tlmgr revision 32912 (2014-02-08 00:49:53 +0100)
tlmgr using installation: /usr/share/texlive
TeX Live (http://tug.org/texlive) version 2013

Consequently, I have also tried to put /usr/share/texlive in the path.
Also, I don't understand why it says "version 2013" when I just installed the 2016 one, but maybe that's a print mistake…?

I really don't know what else to try. I saw this related thread Why getting this error tlmgr Unknown directive?
but the tex live version I installed is the upstream one not the one from the ubuntu software center.

I am a Linux beginner, please help!!

Best Answer

I added export PATH="$PATH:/home/myusername/texlive/2016"

That appears to be the wrong directory, at the wrong end of the path.

If you already have tex in your PATH (and you appear to have texlive 2013) then any invocation of tex or latex will use the first one in your path, which will be the old one.

then you need to put the directory with the executables in your path, not the top level texlive directory so for me that is

/usr/local/texlive/2016/bin/x86_64-cygwin

but the last part depends on your operating system, so it should be something like

export PATH=/usr/local/texlive/2016/bin/x86_64-linux:$PATH

You can check which tex is being used with which or type or similar commands:

$ type tex
tex is /usr/local/texlive/2016/bin/x86_64-cygwin/tex