Adachi-BOT
Adachi-BOT copied to clipboard
启动时报错 Failed to launch the browser process
启动bot时提示以下错误信息:
(node:24354) UnhandledPromiseRejectionWarning: Error: Failed to launch the browser process!
/root/Adachi-BOT/node_modules/puppeteer/.local-chromium/linux-901912/chrome-linux/chrome: error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
at onClose (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:197:20)
at Interface.<anonymous> (/root/Adachi-BOT/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:187:68)
at Interface.emit (events.js:387:35)
at Interface.close (readline.js:451:8)
at Socket.onend (readline.js:224:10)
at Socket.emit (events.js:387:35)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:24354) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:24354) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
在执行指令是也出现了报错:日志如下(以指令“十连”为例):
0|bot | ReferenceError: browser is not defined
0|bot | at render (/root/Adachi-BOT/src/utils/render.js:4:16)
0|bot | at Object.module.exports [as gacha] (/root/Adachi-BOT/src/plugins/gacha/index.js:57:11)
0|bot | at processTicksAndRejections (internal/process/task_queues.js:95:5)
在进行npm install 时并未见到failed字眼,chromium可以正常下载。想知道该如何解决上述问题,期待得到开发大大的解答,谢谢!
error while loading shared libraries: libgbm.so.1: cannot open shared object file: No such file or directory
你需要自行解决这个依赖问题,或者参考README.md
使用系统自带的Chromium
来让包管理器为你解决所有的依赖问题。
感谢回复,问题已解决。我使用apt install libgbm1安装了有关软件包后就能正常启动了