It seems that I cannot install packages on WSL running Ubuntu.
I installed TexLive with sudo apt-get install texlive. It ended up in being installed in /usr/share and I also have a ~/texmf folder.
If I run e.g. tlmgr --usermode install standalone I get the following error message:
tlmgr: Local TeX Live (2021) is older than remote repository (2023).
Cross release updates are only supported with
update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.
I downloaded and run the update-tlmgr-latest.sh getting the following error:
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing TeX Live Manager Updater 100%
./runme.sh: Cannot find TeX Live root using kpsewhich --var-value=SELFAUTOPARENT.
./runme.sh: (no tlpkg/texlive.tlpdb and/or tlpkg/tlpobj/.)
./runme.sh: Please set your PATH as needed, otherwise it's hopeless.
Fine, it looks like that I have to include the texlive installation folder in the PATH. I added /usr/share/texlive to the PATH but the error didn't go away. Thinking that I could have added a wrong path I googled what could be the path format of a texlive installation with no success. Programs such as pdflatex and tlmgr are installed in /usr/bin
I tried another route. the output message suggests to read an upgrade.html page. I open it and it says By default, please get the new TL by doing a new installation instead of proceeding here. I followed the instructions in the link and I get error: /usr/local/texlive does not exist (as expected since I have my installation in /usr/share but I cannot see an easy way to tell the installer to consider that path).
I don't know how to proceed further.
EDIT: I am asking how to install packages through tlmgr (generalization) whereas the suggested answer "How to make standalone package available by my LaTeX installation?" is requesting how to install a specific package, that is, the standalone package (specialization).
Although the answer is the same, the question is different, hence, I would be perfectly fine if the closing criteria is "The answer given here applies to this question as well" and not "this question has already answered here" because that would be false and misleading, given that the two questions are different.
Furthermore, a user that wants to know how to install a package through tlmgr would most likely query "how to install packages with tlmgr" rather than "how to install standalone package".
EDIT2: In the "Best way to install packages for TeXLive in Ubuntu?" user is explicitly asking "Can apt-get install or something similar be used?" whereas I am concerned in the tlmgr usage.
sudo apt upgrade texlivebut the texlive version is still 2021. – Barzi2001 Feb 26 '24 at 13:58tlmgr --usermode install standalonedidn't install anything but returned a message about newer texlive version? It didn't explictly told me "If you want to install (that) package then you must upgrade your tex installation" but still... :D – Barzi2001 Feb 26 '24 at 15:00tlmgrdoes not support this, how you could do it (if really intended and not only a mistake), and what you should read. So in this case the message is IMHO fine, but users are different, so I understand that someone may not understand the message. But this would be the trouble with almost every message. – cabohah Feb 27 '24 at 07:43/usr/share/texliveto/usr/local/texlive/NETVERSION, had to add the binary directory structure to that copy, had to copy some files to the binary directory etc. At some point I've stopped the try, because it was to time consuming. – cabohah Feb 27 '24 at 08:22sudo apt install texlivethattlmgrwon't be an option because it is fairly an important thing to know beforehand. Having a minimal degree of redundancy for critical aspects is generally a good idea, don't you agree? – Barzi2001 Feb 27 '24 at 09:17standalone.cls(orstandalone.sty). For debian/ubuntu you needapt install texlive-latex-extra). Therefore … – cabohah Feb 27 '24 at 09:46tlmgror should provide a modifiedtlmgrplease do a debian feature request. We are not responsible for this and therefore your request would be off-topic here. – cabohah Feb 27 '24 at 09:52how to install packages with tlmgrandhow to install the standalone packageare profoundly different questions (you may want to google specialization vs generalization), it is not my fault if you cannot see it. Sorry. – Barzi2001 Feb 27 '24 at 10:13tlmgrafter they installed installed texlive throughaptshall NOT google e.g. "how to use tlmgr with Ubuntu" but they shall instead google "how to install standalone" or (even worst) "how to install latex packages with apt-install" (wht?!) to avoid getting downvoted to the ground and have tons of requests for closing the question? If I need to buy a pair of shoes of a certain brand I would not google "how to prepare fried rice". Or am I weird? – Barzi2001 Feb 27 '24 at 11:36