TeXblog

 Typography with TeX and LaTeX

The MiKTeX Package Manager 2.7 on Ubuntu Linux 8.04 LTS (Hardy Heron)

1 July 2008 by Stefan Kottwitz

The MiKTeX Package Manager (mpm) is a tool originally intended for MiKTeX users on Windows platforms. It was ported by Christian Schenk for unix systems, to provide easy access to the MiKTeX package repository also for unix user. There are some docs describing installation and use, some are obsolete now, that’s why I will give a summary how I’ve installed the mpm on the latest Ubuntu Linux version today.

The mpm sources can be downloaded from http://miktex.org/unx.

Important: have a look at the README.unx file! Below are the commands I applied during installation.

Installation of some required packages in addition to the basic setup:
$ sudo apt-get install g++ cmake libcurl3 libcurl4-gnutls-dev lynx

Decompress the archive, change into the created directory, run cmake to produce customized makefiles (I added options to use texmf in my home directory) , run make to compile and to install:
$ tar xfj miktex-2.7.2960.tar.bz2
$ cd miktex-2.7.2960/
$ cmake -G "Unix Makefiles" -DMIKTEX_INSTALLROOT="/home/stefan/texmf" -DMIKTEX_ROOTS="/home/stefan/texmf"
$ make
$ sudo make install

The MiKTeX Package Manager installation is complete. Create the file name database files:
$ sudo ldconfig
$ sudo initexmf -u
$ sudo mpm --update-db

Finally the mpm is ready to use.

Links:

This entry was posted on 1 July 2008 at 12:36 AM and is filed under MiKTeX, Tools for LaTeX, Linux/ Ubuntu Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

18 responses about “The MiKTeX Package Manager 2.7 on Ubuntu Linux 8.04 LTS (Hardy Heron)”

  1. Stefan Kottwitz said:

    Instead of make install it could be a good idea to use the checkinstall tool.

  2. ElectroSizzle.com » Ubuntu 8.04, SUN Java6 JDK, TexLive, Eclipse 3.4 and Texlipse said:

    […] is a great LaTex package manager for windows, but it turns out you can compile it for linux too! I’m not going to go through it step by step, because that website does an excellent job of […]

  3. Aakaasha said:

    Does it work the same way with Ubuntu 7.10 too? I have problems with the “make” step.

  4. Stefan Kottwitz said:

    I was using the mpm 2.5 on Ubuntu 7.04 and 7.10, I’ve described the installation here, perhaps there’s already some useful information for you.
    Of course I have to say consider to update to at least 8.04.

  5. KOMA-Script 3 available - TeXblog - Typography with TeX and LaTeX said:

    […] edit Nov 11: KOMA-Script 3 is available now also as MiKTeX package. I’ve installed it with TeX Live on Ubuntu Linux by the MiKTeX package manager. […]

  6. Ben Pietras said:

    sudo apt-get install libqt4-dev

  7. maik said:

    Thank you for your recipe. I am new to Linux and I wanted to use the mpm as I was used to under winxp.

    And I am almost done …

    There is just one thing, the mpm installs packages under:
    /home/user/miktex-texmf
    And I can’t get texlive to make use of this folder, nor to change the folder within mpm into e.g. /home/texmf

    What can I do, that I can use the packages?

    Any help welcome.

  8. Stefan Kottwitz said:

    Hi Maik,

    check your setting of the environment variable $TEXMFHOME:
    kpsewhich -var-value=TEXMFHOME

    in the terminal/ shell.

    You could change the setting for instance with the bash shell by export:
    export TEXMFHOME='/home/user/miktex-texmf'

    To make it persistant add this line for example to your ~/.bashrc or ~/.bash_profile.

    Stefan

  9. maik said:

    Thank you Stefan!!!

    that did the trick.
    Btw. somehow the directory of MPM changed by itself to “/usr/local/share/miktex-texmf”

    Anyhow the MPM is working fine and so I always have most up to date latex pkgs.

    Maik

  10. koen said:

    Hi Stefan!

    Thanks to your tutorial I’ve just managed to compile miktex 2.8 beta 2 on ubuntu 8.10. However, like Maik, I’m having troubles getting the downloaded packages to work with texlive. Unfortunately your suggestion to him doesn’t seem to work for me. $TEXMFHOME points at the directory where the new packages are stored, but after a ’sudo texhash’ pdflatex still complains about a missing .sty file even though a locate command shows that it is in fact in the miktex-texmf structure. Any obvious step that I’m missing? In any case, thanks so much for taking the time to document your installation steps here.. cheers!

  11. Stefan Kottwitz said:

    Hi koen,

    have a look at your texmf.cnf file, you can find it by locate or kpsewhich. Read the comments inside, they could be helpful in order to adjust the TeX variables. Without to look at your system directly it’s hard to guess the reason. I’m not using the mpm now, I’ve installed TeX Live that’s coming with its own package manager tlmgr, perhaps this could be an option for you too.

    Stefan

  12. koen said:

    Thanks for your quick response!

    TeX Live 2008 (and 2009) sure do look good with the package manager! I found your post about getting it to run outside apt, which I might give a try later.. but I’m a bit scared of messing up my LaTeX system on my main computer while writing my thesis :)

    Anyhow, I got everything to work with texhash after a very simple ‘mv /home/user/miktex-texmf /home/user/texmf’ and changing the ownership from root to myself. But a whole new world opened up with the config files.. good to know where all those variables are defined. Hope I can ignore it for a little bit and concentrate on the content of my tex documents again.. thanks for your help!

  13. Sören said:

    Hi Stefan,
    I am having some similar problems, but none of your advises did work at all. My TEXMFHOME variable is set to $HOME/miktex-texmf and I installed a new package there. This, however, does not work. Kile only compiles the test file if I copy the files stored in $HOME/miktex-texmf to my /usr/share/texmf directory. I also had a short look on my texmf.cnf, but it wasn’t very helpful. Any idea what might go wrong? I would appreciate any help!
    Thanks,
    Sören

  14. Sören said:

    Hi,
    after some more hours of trial and error i set up the variable at logon in the file ~/.profile.
    I don’t know why, but that worked fine with kile. Apparently, kile only loads the variable TEXMFHOME once at the start.
    By the way, I found that in another forum thread and the tipp was by you :-)
    Thanks a million!
    Sören

  15. Stefan Kottwitz said:

    Hi Sören,

    I’m glad that it helped!

    Stefan

  16. swissz said:

    Hi!

    Thanks for the howto!
    On Ubuntu 9.10 Karmic I had to install the following packages before the compilation:
    #sudo apt-get install bison flex libqt4-dev
    Then I made a
    #sudo checkinstall
    and it is working now.

    Regards.

  17. Christoph said:

    Hallo Stefan,

    erst einmal vielen Dank für die Mühe, die Du Dir hier gemacht hast. Eventuell kannst Du mir helfen: Beim Versuch Deiner Anleitung folgend erhalte ich bereits beim ersten Befehl die Meldung “Konnte Datei libcur13 nicht finden”. Ich benutze ein Xubuntu 9.10 und betrachte mich als absoluten Linux-Neuling. Xubuntu läuft seit einer guten Woche erst auf meinem Rechner…

    Christoph

  18. Stefan Kottwitz said:

    Hallo Christoph,

    es muss libcurl3 statt libcur13 heißen, es ist ein kleiner Buchstabe l statt der Ziffer 1.

    Viele Grüße,

    Stefan

Leave a Reply