0

I recently installed Tex Live 2021 (on ubuntu 16.04) and it partially works but now I am running into trouble when I try to install packages.

I haven't seen my combination of problems anywhere here so maybe it is worth a question...

My current configuration produces:

:~$ which tlmgr
/usr/local/texlive/2021/bin/x86_64-linux/tlmgr

:~$ tlmgr --version tlmgr revision 59291 (2021-05-21 05:14:40 +0200) tlmgr using installation: /usr/local/texlive/2021 TeX Live (https://tug.org/texlive) version 2021

:~$ echo $PATH /usr/local/texlive/2021/bin/x86_64-linux:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

Which I think means that my installation is correct and also the PATH is correct. But installing via tlmgr doesn't work (e.g. the package "default"):

:~$ sudo tlmgr install default
(running on Debian, switching to user mode!)
tlmgr: Cannot load TeX Live database from https://ftp.yz.yamagata-u.ac.jp/pub/CTAN/systems/texlive/tlnet

This isn't a problem of the specific repostitory, running it again checks a different one:

:~$ sudo tlmgr install --repository http://mirror.ctan.org/systems/texlive/tlnet default
(running on Debian, switching to user mode!)
tlmgr: Cannot load TeX Live database from https://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet

Any ideas what could be wrong? Other things I should check?

mab
  • 337
  • 1
    (running on Debian, switching to user mode!) that is the debian system tlmgr not the one you showed, you need to set the PATH for sudo use as well as your standard path – David Carlisle Nov 29 '21 at 16:00
  • This is the correct answer! I don't know how to permanently set the PATH for sudo use but running sudo env PATH=$PATH tlmgr install default works! (It gives a different error but that means success with respect to my question). – mab Nov 29 '21 at 16:10
  • https://superuser.com/questions/927512/how-to-set-path-for-sudo-commands – David Carlisle Nov 29 '21 at 16:20

1 Answers1

2
(running on Debian, switching to user mode!) 

shows that is the debian system tlmgr not the one you showed, you need to set the PATH for sudo use as well as your standard path, see for example

https://superuser.com/questions/927512/how-to-set-path-for-sudo-commands

David Carlisle
  • 757,742