4

When trying to compile a huge pgfplot with several plots I receive the following error:

TeX capacity exceeded, sorry [main memory size=5000000]. \end{document}

There is no error in code as compiling goes completely fine when not compiling all plots in once.


To increase the mentioned main memory size on a Debian machine I found this solution:

  1. Edit /etc/texmf/texmf.d/00debian.cnf and add these values:

    main_memory = 12000000
    extra_mem_bot = 12000000
    font_mem_size = 12000000
    pool_size = 12000000
    buf_size = 12000000
    
  2. Run update-texmf

  3. Run texhash


Unfortunately, executing update-texmf delivers a command not found. Is there some other solution available to update/increase the main memory? However, the second command texhash went fine (but is useless without succeeding the first one I guess?).

Dave
  • 3,758
  • 3
    What is reported by 1) ls -l /usr/sbin/update-texmf [Is the file really missing?] 2) dpkg -l tex-common [Have you installed package providing the file?] – AnFi Apr 12 '19 at 21:04
  • 1
    According to the page given both should have been sudo so it should have said sudo update-texmf first then sudo texhash and you can try bumping up to12500000 but drop some of the others such as fonts I seem to remember its not a good idea to keep them inflated (hmm must check mine later) also review https://tex.stackexchange.com/questions/7953/how-to-expand-texs-main-memory-size-pgfplots-memory-overload –  Apr 13 '19 at 01:17
  • AnFi identified that /usr/sbin/update-texmf should have been installed by tex-common which also included the file /etc/texmf/texmf.d/00debian.cnf so beware dpkg may overwrite so take a backup of your .cnf edits –  Apr 13 '19 at 01:31
  • @AnFi: According to 1), requesting ls -l /usr/sbin/update-texmf delivers a -rwxr-xr-x 1 root root 2659 Feb 28 15:28 /usr/sbin/update-texmf, so the file seems not to be missing. According to 2), executing dpkg -l tex-common brings ii tex-common 6.11 all common infrastructure for building and installing TeX, and furthermore dpkg -s tex-common brings Status: install ok installed. I guess everything should be fine here, no? – Dave Apr 13 '19 at 11:54
  • If the command is valid (not corrupt) then it should work if that location is correctly configured for shell (so importantly may need to check that out) OR you could run from that location (navigate there to run) but that should not be the way to go. –  Apr 13 '19 at 16:37
  • use: sudo -i and then update-texmf – Alejandro Salamanca Mazuelo May 29 '23 at 18:47

0 Answers0