I have just installed texlive 2014 on a machine running Ubuntu 14.04 LTS at work. When I enter tlmgr update --self
to the terminal for example, it returns the following:
tlmgr: package repository http://mirror.switch.ch/ftp/mirror/tex/systems/texlive/tlnet
You don't have permission to change the installation in any way,
specifically, the directory /usr/local/texlive/2014/tlpkg/ is not writable.
Please run this program as administrator, or contact your local admin.
as expected.
When I use sudo, however, the answer is as follows:
sudo: tlmgr: command not found
Interestingly enough though, when I enter sudo su
, the command is well known.
Moreover, when I enter sudo -i
and then echo $PATH
, the output is:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2014/bin/x86_64-linux
As well as the output for echo $PATH
when entered without sudo -i
:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/texlive/2014/bin/x86_64-linux
Does anybody have a solution to this?
tlmgr
in itsPATH
. If the OS should be able to findtlmgr
for root, then usePATH=${PATH}:<installation directory of tlmgr>
. (You may have to addexport PATH
too.) If I had to do this, I'd put thePATH=...
statement in the root's login file, which I suspect is.bashrc
in the root's home directory.PATH
and not at the tail. Usually I make an alias or shell functionsutlmgr
that doessudo /path/to/tlmgr
explicitly.sudo su
and thenecho $PATH
the directory is not printed. I added the lineexport PATH=/usr/local/texlive/2014/bin/x86_64-linux:$PATH
to the/root/.bashrc
file, butsudo
will still not find the command.sudo su
still works. If possible, I would like to change the root'sPATH
variable instead of writing an alias or shell function, though...psudo
: in.bashrc
or a file sourced by it, I use:alias psudo='sudo env PATH="$PATH"' # usage: psudo tlmgr <whatever>
. (This assumes your paths are set up normally according to the installation directions.sudo -i tlmgr update --all
.