CMHopeSunshine / LittlePaimon

小派蒙!基于Nonebot2的原神机器人,包括但不限于UID面板查询、抽卡记录分析、游戏攻略图鉴、实时便签、原石札记、群聊学习、群管等功能。/ LittlePamon! Genshin Impact multifunctional bot based on Nonebot2.
https://docs.paimon.cherishmoon.top
GNU Affero General Public License v3.0
1.15k stars 127 forks source link

求助大佬,CentOS下Playwright安装依赖报错怎么解决 #351

Closed OyatsuSuki closed 1 year ago

OyatsuSuki commented 1 year ago

有大佬可以告知一下如何解决吗,万分感谢。 BEWARE: your OS is not officially supported by Playwright; installing dependencies for Ubuntu as a fallback. Installing dependencies... base | 3.6 kB 00:00:00
docker-ce-stable | 3.5 kB 00:00:00
epel | 4.7 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
Metadata Cache Created Next time you may want to use: yum makecache fast Error: Need to pass a list of pkgs to install Mini usage:

install PACKAGE...

Install a package or packages on your system

aliases: install-n, install-na, install-nevra Next time you may want to use: yum install -y BEWARE: your OS is not officially supported by Playwright; downloading fallback build. BEWARE: your OS is not officially supported by Playwright; downloading fallback build. 12-21 14:49:21 [ERROR] uvicorn | Traceback (most recent call last): File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 19, in init _browser = await launch_browser(kwargs) File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 30, in launch_browser return await _playwright.chromium.launch(kwargs) File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/async_api/_generated.py", line 12664, in launch await self._impl_obj.launch( File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_browser_type.py", line 93, in launch Browser, from_channel(await self._channel.send("launch", params)) File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 43, in send return await self._connection.wrap_api_call( File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 396, in wrap_api_call return await cb() File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 78, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: ╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Missing libraries: ║ ║ libatk-1.0.so.0 ║ ║ libatk-bridge-2.0.so.0 ║ ║ libatspi.so.0 ║ ║ libXcomposite.so.1 ║ ║ libXdamage.so.1 ║ ║ libXext.so.6 ║ ║ libXfixes.so.3 ║ ║ libXrandr.so.2 ║ ║ libgbm.so.1 ║ ║ libxkbcommon.so.0 ║ ║ libpango-1.0.so.0 ║ ║ libcairo.so.2 ║ ║ libwayland-client.so.0 ║ ╚══════════════════════════════════════════════════════╝

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 635, in lifespan async with self.lifespan_context(app): File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 530, in aenter await self._router.startup() File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/starlette/routing.py", line 612, in startup await handler() File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 53, in start_browser await get_browser(kwargs) File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 34, in get_browser return _browser or await init(kwargs) File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 24, in init _browser = await launch_browser(kwargs) File "/root/LittlePaimon/LittlePaimon/utils/brower.py", line 30, in launch_browser return await _playwright.chromium.launch(kwargs) File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/async_api/_generated.py", line 12664, in launch await self._impl_obj.launch( File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_browser_type.py", line 93, in launch Browser, from_channel(await self._channel.send("launch", params)) File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 43, in send return await self._connection.wrap_api_call( File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 396, in wrap_api_call return await cb() File "/root/.cache/pypoetry/virtualenvs/littlepaimon-VcV7FQZJ-py3.9/lib/python3.9/site-packages/playwright/_impl/_connection.py", line 78, in inner_send result = next(iter(done)).result() playwright._impl._api_types.Error: ╔══════════════════════════════════════════════════════╗ ║ Host system is missing dependencies to run browsers. ║ ║ Missing libraries: ║ ║ libatk-1.0.so.0 ║ ║ libatk-bridge-2.0.so.0 ║ ║ libatspi.so.0 ║ ║ libXcomposite.so.1 ║ ║ libXdamage.so.1 ║ ║ libXext.so.6 ║ ║ libXfixes.so.3 ║ ║ libXrandr.so.2 ║ ║ libgbm.so.1 ║ ║ libxkbcommon.so.0 ║ ║ libpango-1.0.so.0 ║ ║ libcairo.so.2 ║ ║ libwayland-client.so.0 ║ ╚══════════════════════════════════════════════════════╝

12-21 14:49:21 [ERROR] uvicorn | Application startup failed. Exiting.

CMHopeSunshine commented 1 year ago

不要用centos,不然会很不幸 参考 #342

OyatsuSuki commented 1 year ago

~不要用centos,不然会很不幸~ 参考 #342

感谢,这个已经解决了,已经顺利运行了,不过在运行“help”的时候会被killed诶

12-22 13:12:04 [INFO] nonebot_plugin_gocqhttp | [] 收到好友 𝓥𝓮𝓷𝓽𝓲☁️🍰() 的消息: help (1032055895) 12-22 13:12:04 [SUCCESS] nonebot | OneBot V11 183267474 | [message.private.friend]: Message ** from ** "help" 12-22 13:12:04 [INFO] nonebot | Event will be handled by Matcher(type='message', module=LittlePaimon.plugins.plugin_manager) 12-22 13:12:05 [INFO] uvicorn | - "GET /api/status HTTP/1.1" 200 12-22 13:12:05 [INFO] uvicorn | - "GET /api/accounts HTTP/1.1" 200 Killed

CMHopeSunshine commented 1 year ago

啊这,机器内存是不是有点小,装的插件多的话,生成help的时候会耗很大的内存,不够的话会被killed,可以将一些插件的show改为false让它在help里不显示

OyatsuSuki commented 1 year ago

ok感谢啦