无法为此处文档创建临时文件:没有这样的文件或目录

无法为此处文档创建临时文件:没有这样的文件或目录

只有其他关于此问题的帖子是“设备上没有剩余空间”或“权限被拒绝”问题。

尝试运行一些使用 puppeteer 和 chromium 的东西,它在一段时间内完美地工作了。然后我注意到有东西占用了我的 Raspberry Pi (Ubuntu 22.04) 上 40+ GB 的存储空间,并且能够追踪到 /tmp 目录。我可能应该只删除 X 天前的文件,但我全部清除了。

所以现在我收到这个错误;

/node_modules/@puppeteer/browsers/lib/cjs/launch.js:262
                reject(new Error([
                       ^

Error: Failed to launch the browser process!
/snap/chromium/2427/snap/command-chain/desktop-launch: line 369: cannot create temp file for here-document: No such file or directory
[0502/015204.839827:ERROR:platform_shared_memory_region_posix.cc(214)] Creating shared memory in /tmp/.org.chromium.Chromium.T68flj failed: No such file or directory (2)
[0502/015204.839841:ERROR:platform_shared_memory_region_posix.cc(214)] Creating shared memory in /tmp/.org.chromium.Chromium.57yYHj failed: No such file or directory (2)


TROUBLESHOOTING: https://pptr.dev/troubleshooting

    at ChildProcess.onClose (/home/th/dsc/node_modules/@puppeteer/browsers/lib/cjs/launch.js:262:24)
    at ChildProcess.emit (node:events:525:35)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)

Node.js v18.16.0

它仍然能够将文件夹保存在 /tmp 中,所以不知道现在该怎么办。

答案1

两个“缺少目录”错误表明您已删除应用程序的工作目录但/tmp尚未重新启动它:

Creating […] in /tmp/.org.chromium.Chromium.T68flj failed: No such file or directory (2)
Creating […] in /tmp/.org.chromium.Chromium.57yYHj failed: No such file or directory (2)

其本身的权限/tmp应该1777/rwxrwxrwt由 拥有root:root

相关内容