1

I was trying to find ways to install MikTex on Linux Mint 21 (which is based on Ubuntu 22.04 LTS) but could not find any solution yet.

2
  • 3
    Why even use MikTeX on linux? TeXLive is much more common on linux. MikTeX should work of course
    – daleif
    Aug 22, 2022 at 7:18
  • 1
    MikTeX used to be a Windows based distribution. It has been partially ported to Linux, I think, but you're probably better off with TexLive. That said, have you followed these instructions: miktex.org/howto/install-miktex-unx ?
    – Ingmar
    Aug 22, 2022 at 7:18

1 Answer 1

1

For a CI/CD pipeline, I think, it might make some sense to use MiKTeX on Linux. I was assuming, it behaves the same as on Windows. However, it does not in all cases. Therefore, I asked the question at https://github.com/MiKTeX/miktex/discussions/1365.

I came this far (for Ubuntu Jammy - for others, adapt the second line in the following script accordingly)

sudo gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/miktex.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/miktex.gpg] https://miktex.org/download/ubuntu jammy universe" | sudo tee /etc/apt/sources.list.d/miktex.list
sudo apt-get update -y -q
sudo apt-get install -qq -y --no-install-recommends miktex
miktexsetup --verbose finish
initexmf --verbose --set-config-value=[MPM]AutoInstall=1
miktex --verbose packages update-package-database
miktex --verbose packages update
miktex --verbose packages update
miktex --verbose packages install cm-super
miktex --verbose fndb refresh
initexmf --verbose --update-fndb
initexmf --verbose --mklinks --force
updmap

Then, following LaTeX document compiles fine:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[expansion=alltext]{microtype}
\begin{document}
text text text text text text text text text text text text text text text
text text text text text text text text text text text text text text text
\end{document}

Full CI pipeline at https://github.com/koppor/mwe-miktex/blob/main/.github/workflows/check.yml

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .