getnonfreefonts on a recent TL and Ubuntu
Paulo Ney de Souza
pauloney at gmail.com
Sat Sep 4 19:04:43 CEST 2021
Jim,
Can you tell us how you install TL? There are essentially 4 ways that
people do that:
1- As a normal user, and leaving it like that
2- As a normal user and changing it all to root after installation
3- Executing TL install under "sudo"
4- Doing and "sudo bash" and executing TL install.
I am trying to see if I can reproduce your problem, and these 4 ways
produce different installations.
Paulo Ney
On Sat, Sep 4, 2021 at 3:58 AM Hefferon, Jim S. <jhefferon at smcvt.edu> wrote:
> Reinhard,
>
> Thank you for the reply. Yes, /usr/local/texlive is owned by root.
> Everything in /usr/local is owned by root, that I can see. (I doubt that I
> did anything fancy when I installed, I am not a very sophisticated user and
> I tend to just follow the instructions. Of course, I could have flubbed
> something up.)
>
> A comment about what I am doing. I have a textbook where people can
> download the source. I am releasing a new version. So I put a clean
> install on an old machine, and I am going through my INSTALL, checking that
> the instructions work. In 2018 the instruction to install and run
> getnonfreefonts worked great, but not yesterday.
>
> It sounds like I at least am not overlooking something obvious. So thank
> you to you and Bob for the help. In my INSTALL I am not going to suggest
> that people steal the local tree :-), so I will instead install Luximono by
> hand and include instructions for that.
>
> Regards,
> Jim
>
> ________________________________________
> From: Reinhard Kotucha <reinhard.kotucha at web.de>
> Sent: Friday, September 3, 2021 17:06
> To: Hefferon, Jim S.
> Cc: texhax at tug.org
> Subject: Re: getnonfreefonts on a recent TL and Ubuntu
>
> On 2021-09-03 at 19:46:15 +0000, Hefferon, Jim S. wrote:
>
> > Hello,
> >
> > I am trying to install Luximono to a brand new Ubuntu and TeX Live
> > installation (Ubuntu 20, TL 2021). I am having trouble installing
> > getnonfreefonts. No doubt I am missing some point, but I just
> > cannot see what. (I am having some trouble with an email account,
> > so I apologize if this message is a dupe.)
> >
> > As described on https://tug.org/fonts/getnonfreefonts/, I used wget
> > to download install-getnonfreefonts to the current directory. I
> > then tried to run texlua.
> >
> > ftpmaint at Alonzo:~/Documents$ texlua ./install-getnonfreefonts
> > Detected System: x86_64-linux Detected Installation:
> > /usr/local/texlive/2021 mkdir
> > /usr/local/texlive/2021/texmf-dist/scripts/getnonfreefonts ...
> > [failed] Sorry, couldn't create directory
> > /usr/local/texlive/2021/texmf-dist/scripts/getnonfreefonts
> >
> > (I made install-getnonfreefonts executable but that didn't change
> > the outcome.) OK, maybe sudo?
>
> Hi Jim,
> yes, if /usr/local/texlive is owned by root...
>
> > ftpmaint at Alonzo:~/Documents$ sudo texlua ./install-getnonfreefonts
> > sudo: texlua: command not found
> >
> > Maybe it does not like the path?
>
> AFAIK sudo does't use the PATH variable from the environment for
> security reasons.
>
> > ftpmaint at Alonzo:~/Documents$ sudo
> /usr/local/texlive/2021/bin/x86_64- linux/texlua install-getnonfreefonts
> > lstat(./texlua) failed: ./texlua: No such file or directory
> > kpathsea: Can't get directory of program name: ./texlua
> >
> > Even this did not work.
>
> I don't understand why your system calls ./texlua (in your current
> working directory) though you specified the full path. I don't know
> why this happens. This should never happen because it's a big
> security hole.
>
>
> > ftpmaint at Alonzo:~/Documents$ sudo
> /usr/local/texlive/2021/bin/x86_64- linux/texlua
> /home/ftpmaint/Documents/install-getnonfreefonts
> > lstat(./texlua) failed: ./texlua: No such file or directory
> > kpathsea: Can't get directory of program name: ./texlua
> >
> > I note the kpathsea errors. If it helps, my /etc/profile says this.
> >
> > export PATH="/usr/local/texlive/2021/bin/x86_64-linux:$PATH"
> > export MANPATH="/usr/local/texlive/2021/texmf-dist/doc/man:$MANPATH"
> > export
> INFOPATH="/usr/local/texlive/2021/texmf-dist/doc/info:$INFOPATH"
> >
> > Using sudo -s or sudo su gave similar results (and are at or past
> > the limits of my knowledge). Googling around gave results from at
> > most 2016, and they didn't help. Any ideas would be most welcome.
>
> If sudo su doesn't work there seems to be something severely wrong
> with your system. It's the first thing I do after a Linux
> installation in order to set the passwd for root so that I can log in
> as root with su and without sudo.
>
> The best you can do is to steal /usr/local and avoid sudo in the
> future. You still need it for Debian updates though.
>
> /usr/local is for local additions and there is no need to be owned by
> root. The sole reason it's owned by root by default is that the Linux
> installer is not aware of any users and, of course, only root can
> decide whom to grant write access to particular directories.
>
> So my recommendation is to steal the local tree:
>
> sudo chown -R jim:users /usr/local (if jim is your login name)
>
> If this works you can change files in /usr/local without sudo. You
> don't need and shouldn't use sudo for "tlmgr update" anymore. And you
> can install getnonfreefonts as a mortable user with TeX Live in PATH.
> It's even more secure because a mortal user can't break the system.
>
> But I'm concerned because you said that "sudo su" doesn't work for
> you. I hope that at least "sudo chown ..." works. If not, your
> system is broken and we have to examine the files in /etc.
>
> Regards,
> Reinhard
>
> --
> ------------------------------------------------------------------
> Reinhard Kotucha Phone: +49-511-3373112
> Marschnerstr. 25
> D-30167 Hannover mailto:reinhard.kotucha at web.de
> ------------------------------------------------------------------
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210904/a0cc4a48/attachment-0001.html>
More information about the texhax
mailing list.