Bookdown error: ! I can't write on file `skills.pdf'.


I encountered this problem when using Bookdown.

accepted
! I can't write on file `bioinfBookXIE186.pdf'.
(Press Enter to retry, or Control-D to exit; default file extension is `.pdf')
Please type another file name for output
! Emergency stop.
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                  \fi \fi 
l.199 \maketitle
! Emergency stop.
\AtBegShi@Output ...ipout \box \AtBeginShipoutBox 
                                                  \fi \fi 
l.199 \maketitle
Error: Failed to compile bioinfBookXIE186.tex. See bioinfBookXIE186.log

Here is the answer from stackexchange:


accepted
! I can't write on file `skills.pdf'.
In this case, the error is caused by not having enough memory. The clone(...) = -1 ENOMEM (Cannot allocate memory) error from strace prompted me to check my ram usage. Running xelatex with 150M of free ram provokes the write/clone() error. Running with at least 500M of free ram consistently avoids the error. I haven't experimented enough to know exactly how much free ram is enough, but I suppose that also depends on the complexity of the tex file.
To compensate, I created a swap file (fwiw, I usually don't have one).
dd if=/dev/zero of=/var/512mb.swap bs=1M count=512
mkswap /var/512mb.swap
swapon /var/512mb.swap

It works for me.

Comments

Popular posts from this blog

gspread error:gspread.exceptions.SpreadsheetNotFound

Miniconda installation problem: concurrent.futures.process.BrokenProcessPool: A process in the process pool was terminated abruptly while the future was running or pending.

转载:彻底搞清楚promoter, exon, intron, and UTR