M BUZZ CRAZE NEWS
// general

command not found when run with sudo

By Emma Martinez

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 found

How can that be?

2

1 Answer

Try the full path of tlmgr, i.e.

sudo /usr/local/bin/tlmgr install book

Adjust the path to your setting.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy