错误“打开的文件太多”在pdflatex中

发布于 2024-08-11 00:57:57 字数 251 浏览 1 评论 0原文

当编译包含 15 个左右的包和大约 5 个包含的 Latex 文档时,pdflatex 会抛出“打开文件过多”错误。所有包含都以 \endinput 结束。有什么想法可能会导致错误吗?

该错误似乎取决于使用了多少个包(毫不奇怪......);然而,这不是我第一次使用这么多的软件包,而且我以前从未遇到过这样的错误。

@axel_c:这与 Linux 无关。您可能知道也可能不知道,LaTeX 也可以在 Windows 上使用(这恰好是我现在正在使用的)。

When compiling a latex document with 15 or so packages and about five includes, pdflatex throws a "too many open files"-error. All includes are ended with \endinput. Any ideas what might cause the error?

The error seems to depend on how many packages are used (no surprise...); however, this is not the first time I use this many packages, while I've never encountered such an error before.

@axel_c: This is not about linux. As you may or may not know, LaTeX is also available on windows (which just happens to be what I'm using right now).

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

尝试

\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}

\documentclass 之前插入。

另请参阅 pdftex 邮件列表中的这些主题:

Try inserting

\let\mypdfximage\pdfximage
\def\pdfximage{\immediate\mypdfximage}

before \documentclass.

See also these threads from the pdftex mailing list:

把回忆走一遍 2024-08-18 00:57:57

键入

ulimit -n

以获取打开文件的最大数量。要将其更改为例如 2048,请输入

ulimit -S -n 2048

Type

ulimit -n

to get the maximum number of open files. To change it to e.g. 2048, type

ulimit -S -n 2048
幸福%小乖 2024-08-18 00:57:57

此命令给您带来什么:

$ ulimit -n

您可能希望通过编辑 /etc/security/limits.conf 文件来增加它。

What is this command giving you:

$ ulimit -n

You might want to increase it by editing /etc/security/limits.conf file.

但可醉心 2024-08-18 00:57:57

这可能是由于“最大打开文件描述符”内核配置中的值较低造成的。假设您使用的是 Linux,您可以运行此命令来找出当前限制:

cat /proc/sys/fs/file-max 

如果限制较低(例如 1024 左右,这是某些 Linux 发行版中的默认值),您可以尝试通过编辑 /etc/ 来提高它sysctl.conf:

  fs.file-max = 65536

详细信息可能会有所不同,具体取决于您的 Linux 发行版,但快速的 google 搜索可以让您轻松修复它。

This could be caused by a low value in your 'max open file descriptors' kernel configuration. Assuming you're using Linux, you can run this command to find out current limit:

cat /proc/sys/fs/file-max 

If the limit is low (say, 1024 or so, which is the default in some Linux distros), you could try raising it by editing /etc/sysctl.conf:

  fs.file-max = 65536

Details may differ depending on your Linux distribution, but a quick google search will let you fix it easily.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文