5

So, after installing TeX Live 2015 (via the downloadable package) next to Homebrew, my directory-structure looks like this

drwxr-xr-x  24   ec admin   816 20 Jan   20:58 | /usr/local
drwxr-xr-x 176   ec admin  5984 20 Jan   21:46 + /usr/local/Cellar 
...
drwxr-xr-x  55   ec admin  1870 20 Jan   21:50 + /usr/local/share 
drwxr-xr-x   5 root wheel   170 20 Jan   21:32 + /usr/local/texlive 
drwxr-xr-x   7   ec admin   238 13 Oct   19:52 + /usr/local/var 

(Something look a little out-of-place? :P)

> tlmgr install latex latex-bin latexconfig latex-fonts
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2015/tlpkg/ is not writable.
Please run this program as administrator, or contact your local     admin.
tlmgr: An error has occurred. See above messages. Exiting.

So, I'd really rather not run commands as root, thanks.

Was there a correct way to install TeX Live that doesn't require subsequent sudo to run commands? /= And in either case, is it safe to recursively-chown the entire /usr/local/texlive tree, to repair this?

(I don't seem to be the first one to have these problems ...)

1 Answer 1

8

The MacTeX package will always install TeX Live as root, as authorization is ordinarily required in order to write to /usr/local. Even if you change ownership or permissions, Apple's Installer is more of a glorified tar than anything. If you don't like that, you can install it using the shell script or from within TeX Live Utility.

As maintainer of TeX Live Utility, I recommend that you recursively chown the the tree to your user on a (primarily) single-user system, in order to avoid running my code and tlmgr with root privileges. It's safe to do this, but I wouldn't call it a "repair", since you've changed permissions on a directory that's owned by root in a clean install.

8
  • Keeping user and group as root, chmod -R 755 on your TeX Live directory should work well.
    – Geremia
    Oct 21, 2016 at 23:56
  • I've tried both chown and chmod recursively, and Tex Live still requires password to update packages. Any ideas? Sep 12, 2022 at 17:06
  • 1
    @domoarigato I don't recommend chmod, as you're likely to break programs and scripts. To what user did you assign ownership? Do you mean "TeX Live Utility" still requires password? The Log Window in TLU will tell you if it's doing a recursive permissions check, but I don't recall if it tells you what file that it fails on. You can find that yourself easily enough. Sep 13, 2022 at 6:32
  • 1
    @domoarigato I'm not sure exactly what you did; TLU is just a front end for tlmgr, which maintains its own database of packages installed. If you manually modify /usr/local/texlive/2021, then it's not going to know what you've done. I assume any such modifications would have been wiped out by reinstalling MacTeX, though. Sep 13, 2022 at 13:26
  • 1
    @domoarigato OK, I wondered if you were actually using basictex instead of mactex. If you didn't wipe out the previous install manually, either in Finder or Terminal, the Apple Installer left those additional packages in place, but tlmgr doesn't know about them in its database. You can either remove the directory and reinstall basictex, or just (re)install those additional packages manually in TLU from the Packages tab. Sep 14, 2022 at 0:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .