تجربیات روزانه کار با latex

اشتراک تجربیات روزانه از کار با latex

تجربیات روزانه کار با latex

اشتراک تجربیات روزانه از کار با latex

مشکل RAM در اجرای فرمان xelatex با پیام can't write on pdf file.

چهارشنبه, ۱۴ بهمن ۱۳۹۴، ۰۴:۲۷ ب.ظ

وقتی روی سرور VPS دستور xelatex sample.tex رو اجرا کردم با پیام خطای


can't write on pdf file.


روبرو شدم.


پس از جستجو متوجه شدم که مشکل رم دارم.


اینم راه حل:


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


مشکلات دیگه ای که ممکنه باعث بروز این خطا بشن:



The error message is generated by the prompt_file_name procedure in TeX.

Most likely causes:

A couple of things to note:

  • One cannot type x at this prompt to abort. That will write on a file called x.pdf.
  • In pdflatex, pressing ENTER without retyping the filename unhelpfully writes on a file called .pdf.
  • In lualatex, pressing ENTER without retyping the filename prompts again.
  • In xelatex, this prompt doesn't occur. Instead, one seems to get the message ** ERROR ** Unable to open ... and then it exits.
  • احمد ابریشمی

نظرات  (۰)

هیچ نظری هنوز ثبت نشده است
ارسال نظر آزاد است، اما اگر قبلا در بیان ثبت نام کرده اید می توانید ابتدا وارد شوید.
شما میتوانید از این تگهای html استفاده کنید:
<b> یا <strong>، <em> یا <i>، <u>، <strike> یا <s>، <sup>، <sub>، <blockquote>، <code>، <pre>، <hr>، <br>، <p>، <a href="" title="">، <span style="">، <div align="">
تجدید کد امنیتی