[Tex/LaTex] I am missing latexindent after texlive installation

installinglatexindenttexlive

On Ubuntu 20.04 I installed texlive from the terminal using

$ sudo apt install texlive
$ sudo apt install texlive-latex-recommended

I can compile a minimal example from the terminal without error, but when using LaTex Workshop in Visual Studio Code (actually Codium), it complains with the error

"Can not find latexindent in PATH."

And indeed I cannot find latexindent either. I tried

$ whereis latexindent
latexindent:

While

$ whereis latex

results in

/usr/bin/latex /usr/share/man/man1/latex.1.gz

I cannot find latexindent manually in /usr/bin/latex either, which should be my TexLive installation folder, right?

I searched the web a lot and tried to install latexindent manually:

$ tlmgr install latexindent
/usr/bin/tlmgr: unexpected return value from verify_checksum: -5

Then I tried

$ tlmgr install latexindent --verify-repo=none

Which results in an error where I don't know what to do:

tlmgr: package latexindent is not relocatable, cannot install it in user mode!

Best Answer

If you use a linux system packaged version of texlive then the files are grouped in to larger collections to be managed by apt (or whatever linux package manager you are using). It's probably possible to query the repository directly to discover which collection holds any file but a simple google query such as apt packge latexindent is usually enough. Here I turned up this site which shows that you need

sudo apt install texlive-extra-utils