[Tex/LaTex] Not possible to install packages in Ubuntu Bionic Beaver

installingtexliveUbuntu

Let's start from scratch:

» rm -rf ~/texmf/
» tlmgr init-usertree
(running on Debian, switching to user mode!)
Cannot determine type of tlpdb from /home/zebra/texmf!

What repo do I have?

» tlmgr repository list
(running on Debian, switching to user mode!)
/usr/bin/tlmgr: Initialization failed (in setup_unix_one):
/usr/bin/tlmgr: could not find a usable xzdec.
/usr/bin/tlmgr: Please install xzdec and try again.
tlmgr: Couldn't set up the necessary programs.
Installation of packages is not supported.
Please report to texlive@tug.org.
tlmgr: Continuing anyway ...
List of repositories (with tags if set):
        http://mirror.ctan.org/systems/texlive/tlnet (main)

It seems something is missing. Let's install it:

» sudo apt install xzdec

Now it is better:

» tlmgr repository list
(running on Debian, switching to user mode!)
List of repositories (with tags if set):
        http://mirror.ctan.org/systems/texlive/tlnet (main)

Let's install koma-script:

» tlmgr install koma-script
(running on Debian, switching to user mode!)
tlmgr: Remote repository is newer than local (2017 < 2018)
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
Please see https://tug.org/texlive/upgrade.html for details.

Ok, according to this page, the repo should be 2017 (Ubuntu Bionic Beaver has texlive 2017).

It seems there is a problem with Bionic Beaver, because they are using texlive 2017, but nowhere this is configured, and tex uses by default the current url (http://mirror.ctan.org/systems/texlive/tlnet)

This should be easy to fix. Let's specify the url for the right repo:

» tlmgr option repository ftp://tug.org/historic/systems/texlive/2017/tlnet-final
(running on Debian, switching to user mode!)
tlmgr: setting default package repository to ftp://tug.org/historic/systems/texlive/2017/tlnet-final

This is now correct:

» tlmgr repository list
(running on Debian, switching to user mode!)
List of repositories (with tags if set):
        ftp://tug.org/historic/systems/texlive/2017/tlnet-final (main)

Let's check what is intalled in the system:

» tlmgr list --only-installed
(running on Debian, switching to user mode!)

Nothing!? Strange. Why?? Let's update all packages:

» tlmgr update --all
(running on Debian, switching to user mode!)

Nothing happens, runs forever …

Whatever, let's try to install koma-script anyway:

» tlmgr install koma-script
(running on Debian, switching to user mode!)

Nothing happens, runs forever …

So my question is:

How can I instal koma-script in an Ubuntu 18.04 Bionic Beaver system?

Best Answer

To install a full TeX Live system on Debian-based Linux distributions, such as Ubuntu, use

sudo apt-get install texlive-full

However, the TeX Live system included in the repositories is usually quite outdated and doesn't allow for an upgrade beside full-system upgrades. I recommend removing the distribution-shipped TeX Live system and installing “vanilla” TeX Live instead.