New TEXLIVE install, pdflatex working but packages not found

installing

I'm embarassed by this but but it all resulted from me putting my Ubuntu OS into a coma. I got a new PC with Windows 10 and Ubuntu (linux) installed as dual operating systems. I rarely use Windows but I installed TeXLive 2021 from the DVD into the Ubuntu side of things. Running pdflatex on sample2e.tex (one of the example files) worked fine, but when I tried to process anything but the example files (e.g. same class but with with packages or a different class) all failed because the package/class files could not be found although they are on my computer in `/usr/local/texlive/2021/texmf-dist/tex/latex'

How do I get pdflatex and friends to find these extra class/package files? I have tried setting environment variables like TEXMFLOCAL to the above directory but they are still not found.

Best Answer

you have not put the texlive you installed in your path, your comment shows that kpsewhich (and presumably pdftex) are the system tex using files in

/usr/share/texlive 

not the one you installed in

/usr/local/texlive/2021

Edit your .profile to add

/usr/local/texlive/2021/texmf-dist/bin/x86_64-linux

to the front of your PATH, eg a line such as

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

(You will need to log in again to see the effect of a an edit to .profile)

see Post Install at https://tug.org/texlive/quickinstall.html