Friday, August 02, 2024

TeXstudio under Ubuntu and equivs

Environment: Linux Mint and Ubuntu; separate TeXlive installation

The author of TeXstudio used to distribute deb files for each Linux distribution.  Understandably, that is laborious.  So now, only the PPA is given.  But if you add the PPA to your Linux "software sources" list and try to install TeXstudio, it had dependency links to the whole TeXlive system in the synaptic package library and tries to install all that too.  

The way round this is to create a dummy "TeXlive" installation without these dependencies using the "equivs" system.  (see here and here).

Steps:

  1. sudo apt-get install equivs
  2. Create a control file with this content:
    Section: tex
    Package: texlive-dummy
    Provides: tex-common, texlive-common, texlive-latex-base, texlive-metapost, texlive-xetex, texlive-base-bin, texlive-base-bin-doc, tex-common, tex-gyre, texlive-base, texlive-binaries, texlive-fonts-recommended, texlive-latex-base, texlive-latex-extra, texlive-latex-recommended, texlive-pictures
    Description: texlive dummy package This package provides dpkg with the information that there the texlive packages are already installed.
  3. Run the following:
    equivs-build texlive.ctl
    That produces the file texlive-dummy_1.0_all.deb  This is asudo dpkg -i texlive-dummy_1.0_all.deb "pretend" TeXlive (texlive-latex-base) package that contains no dependencies.
  4. Run
    sudo dpkg -i texlive-dummy_1.0_all.deb
    Now, your system believes it has installed texlive-latex-base, so dependencies on that will be satisfied.
  5. You can now install the TeXstudio PPA and install the TeXstudio program in the normal way.