I installed TexLive 2021, and set my PATH by updating the ~/.bashrc file. So I can run all commands, but not with sudo:
~$ tlmgr install book
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2021/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
tlmgr: An error has occurred. See above messages. Exiting.
~$ sudo tlmgr install book
sudo: tlmgr: command not foundHow can that be?
21 Answer
Try the full path of tlmgr, i.e.
sudo /usr/local/bin/tlmgr install bookAdjust the path to your setting.