LaTeX forum ⇒ TeX Live and MacTeXPATH Problem

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
sbishop33
Posts: 2
Joined: Thu Aug 31, 2017 4:39 am

PATH Problem

Postby sbishop33 » Thu Aug 31, 2017 3:30 pm

Hi All,
I am running Ubuntu 16.04. Almost immediately after installing it, I installed TexLive 2017 from the TexLive web site. Later, I installed Lilypond and Frescobaldi, one of which I think installed an older version of TexLive or at least some core components of that version. TexLive 2017 works fine using an editor configured to point to the 2017 executables. The problem is that when I run tlmgr from the command line I get two different versions of the program, depending on whether I use sudo or not. Sudo tlmgr --gui starts the older version, running from /usr/share/texlive; tlmgr --gui starts the 2017 version, running from /usr/local/texlive/2017, but of course, not using sudo means that the texlive root and subfolders are not writable, which means I cannot update any packages. I think I can solve this with chmod, but I'm curious why using sudo points to a different version of texlive? I have line in my .bashrc file that adds the texlive 2017 path the the $PATH variable. /usr/share/texlive is not in the PATH statment.

Thanks for any light that anyone can shed on this problem.

rais
Posts: 170
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Thu Aug 31, 2017 8:09 pm

well, I'd compare the outcome of
  1. echo $PATH

with
  1. sudo echo $PATH

KR
Rainer

sbishop33
Posts: 2
Joined: Thu Aug 31, 2017 4:39 am

Postby sbishop33 » Fri Sep 01, 2017 1:45 am

Thanks for replying. I did try both those commands with the same results: the path statement is as set in the .bashrc file--i.e., the one I want to be there.

In the interim, I have made the /usr/local/texlive/2017 folder and subfolders writable with the chmod command. Now, tlmgr --gui at the command line starts the 2017 version of tlmgr and it is capable of doing the package updates as usual.

I'm still curious why sudo tlmgr --gui starts an older version of the application if the $PATH variable contains the correct path to the 2017 version folders.

Thanks again,

SB

rais
Posts: 170
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Fri Sep 01, 2017 11:41 pm

The way I see it, you've got two options. Assuming sudo switches to user root: either sudo switches by default the environment to root's environment (in which case, `echo' is somehow exempt from that rule), or sudo keeps the current user's environment (in which case, `tlmgr' is somehow exempt from that rule).
If you want to pursue this issue further, try

and have a look at /etc/sudo*...

KR
Rainer


Return to “TeX Live and MacTeX”

Who is online

Users browsing this forum: No registered users and 1 guest