[Tex/LaTex] MiKTeX installation error “Too many open files”

errorsinstallingmiktex

I tried to install MiKTeX 2.9. Some information:

  • OS: Windows 7, Intel i7, 8 GB RAM.
  • MiKTeX install file: setup-2.9.5987.exe
  • Install from: local repository (downloaded first), full install.
  • Repository date: June 7 2016, version 6002
  • I previously used MiKTeX, today I just want to update the whole thing as usual. The update gave unusual error (won't compile pdflatex), so I tried to uninstall-and-install everything.

It went OK (copied all packages) but in the end it showed the error

The operation could not be completed for the following reason:

Too many open files: path="C:\MiKTeX\miktex/config\packages.ini"

Details: path="C:\MiKTeX\miktex/config\packages.ini"

Screenshot:

MiKTeX installation error

Installation log:

initializing setup service...
starting installer...
Loading package database...
starting package maintenance...
installation directory: C:\MiKTeX
package repository: D:\MiKTeX_2.9_Source
visiting repository D:\MiKTeX_2.9_Source...
repository type: local package repository
loading lightweight database...
lightweight database digest: f6ae0b4a4f8fe510da4d61a2253d6bd4
going to install 113893 file(s) (3096 package(s))
extracting files from 12many.tar.lzma...
extracting files from a0poster.cab...
extracting files from a4wide.tar.lzma...
extracting files from a5comb.tar.lzma...
extracting files from aastex.tar.lzma...
extracting files from abc.tar.lzma...
...
% SNIP
...
extracting files from zxjafbfont.tar.lzma...
extracting files from zxjafont.tar.lzma...
extracting files from zxjatype.tar.lzma...
updating package definition directory (C:\MiKTeX\tpm\packages)...
installed 115 package definition files
visiting repository D:\MiKTeX_2.9_Source...
repository type: local package repository
loading lightweight database...

Error: Too many open files: path="C:\MiKTeX\miktex/config\packages.ini"

How to proceed?

Best Answer

I had the same problem, too. My system is Microsoft Windows 7, 64bits. I have tried to

  • 1) download MikTeX from another repository,
  • 2) reinstall it several times,
  • 3) install 32bits version,
  • 4) close all programs before installing in order to gain some memory etc, but the this problem persisted.

Finally, I solved it as follows:

  • 1) I installed the basic version of MikTex for Windows 64bit.
  • 2) I opened the MikTeX program from Start.
    • chose Maintenance (Admin) - > Settings -> Packages, checked every entry in the list below and pressed Apply.

Then, MikTeX installed all selected packages.