[Tex/LaTex] texlive manager fails to update packages

errorstexliveupdating

My TeXLive installation is corrupt (mdframed supposed to be installed, but it is not).

Running update with the tlmgr, fails with

regenerating fmtutil.cnf in C:/texlive/2011/texmf-var
running fmtutil-sys --no-error-if-no-format --byengine pdftex ...

fmtutil-sys --no-error-if-no-format --byengine pdftex failed (status 23), output:
fatal: memory exhausted (xmalloc of 1840000008 bytes).
Running: "C:\texlive\2011\bin\win32\pdftex" --ini --jobname=amstex --progname=amstex -translate-file=cp227.tcx *amstex.ini <nul

The file amstex.fmt was not created due to some errors.
See the log file C:/texlive/2011/texmf-var/web2c/pdftex/amstex.log for details.

I have no idea what to do. Deleted TeXLive from disk and reinstall?

EDIT:
I reinstalled texlive, but mdframed.sty ist still missing.

Best Answer

I would start with installation check:

tlmgr check all

You can additionally check for cues the amstex.log file that was mentioned in the error message.

Once you know which packages are broken, you can reinstall only the affected parts with:

tlmgr install --reinstall package1 package2 ...

Alternatively, if you don't want to spend time investigating, you can reinstall everything from scratch, but then you learn nothing.