1

How can I use tlmgr to install packages?

$ tlmgr install moderncv
(running on Debian, switching to user mode!)

/usr/bin/tlmgr: TLPDB::from_file could not initialize from: ftp://tug.org/historic/systems/texlive/2020/tlnet-final/tlpkg/texlive.tlpdb
/usr/bin/tlmgr: Maybe the repository setting should be changed.
/usr/bin/tlmgr: More info: https://tug.org/texlive/acquire.html

I have just installed TexLive on Ubuntu 20.04 using sudo apt install texlive.

This seems similar to tlmgr cannot setup TLPDB, but the answer does not work for me.

$ tlmgr init-usertree

tlmgr: user mode database already set up in
tlmgr:   /home/christopher/texmf/tlpkg/texlive.tlpdb
tlmgr: not overwriting it.

Version looks up-to-date

$ tlmgr --version
tlmgr revision 53568 (2020-01-27 19:20:16 +0100)
tlmgr using installation: /usr/share/texlive
TeX Live (http://tug.org/texlive) version 2019
4
  • First of all please don't install the current TeXLive from the tug FTP server. That is why we have the mirrors around the world, use the auto mirror to get your closest mirror. Additionally if you install texlive from Ubuntu, you cannot use tlmgr to install much as tlmgr gets changed. – daleif Dec 16 '20 at 9:07
  • Could you provide some instructions on how to not use the tug FTP server? That ftp address isn't one I set or selected, it seemed to be set within the Ubuntu TexLive package. Do you think that installing via apt first broke tlmgr in a way that uninstalling and installing via the installation script couldn't fix? Is there some broken directory tree or config file that I can annihilate to get this working again? – ipsnicerous Dec 17 '20 at 22:32
  • I have no idea what you did to your system, it should never choose tug as the main repos unless explicitly asked. As I'm generally not a fan 8f the Ubuntu repackaged texlive 7d to a proper texlive 2020 install from the last url you posted. Seems to me that you did not properly add it to your path (it has to be prepended, not appended) and thus you get getting the Ubuntu provided setup – daleif Dec 17 '20 at 22:35
  • Thanks, Daleif. This gave me leads I needed to fix this. The Ubuntu package is indeed borked, and because there are many different distributions (texlive-base, texlive, texlive-full, texlive-extra, etc) I didn't realize I had a texlive-base install from back in February. – ipsnicerous Dec 18 '20 at 23:40
1

Short answer

The Ubuntu package seems to be fairly broken, so remove it and install via https://tug.org/texlive/acquire.html.

Long answer

Find out which package you have installed:

$ which tlmgr
/usr/bin/tlmgr
$ ll /usr/bin/tlmgr
lrwxrwxrwx 1 root root 52 Feb 17  2020 /usr/bin/tlmgr -> ../share/texlive/texmf-dist/scripts/texlive/tlmgr.pl*
$ sudo dpkg -S /usr/share/texlive/texmf-dist/scripts/texlive/tlmgr.pl
texlive-base: /usr/share/texlive/texmf-dist/scripts/texlive/tlmgr.pl

Kill it with prejudice: sudo apt purge texlive-base

Follow instructions in link (above) to install working TexLive.

0

in Ubuntu the TexLive 2019 is in the repository.

The short solution: this error is because you're using wrong repository version. Your TexLive 2019 is trying to use a TexLive 2020 ftp repository.

You should change to the right (correct) repository. Type this commands in a Terminal:

  1. Type this commands in a Terminal to change de default repository
$ tlmgr repository add ftp://tug.org/historic/systems/texlive/2019/tlnet-final
$ tlmgr repository list
$ tlmgr repository remove http://mirror.ctan.org/systems/texlive/tlnet
$ tlmgr option repository ftp://tug.org/historic/systems/texlive/2019/tlnet-final 
  1. Install the LaTeX package you want using this:
tlmgr --verify-repo=none install beamer

in this example I installed beamer package succesfully using the --verify-repo=none parameter.

If you omit the parameter you would get this error: tlmgr: Local TeX Live (2019) is older than remote repository (2020). This error is solved changing the right repository for TexLive 2019.

NOTE: if you want to install the package for all users just type sudo at the beginning of each instruction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.