错误:playwright._impl._api_types.Error:Missing libraries:libdrm.so.2、libgbm.so.1

错误:playwright._impl._api_types.Error:Missing libraries:libdrm.so.2、libgbm.so.1。

错误类似如下:

Traceback (most recent call last):
File “cli_demo.py”, line 21, in
for results in webglm.stream_query(question):
File “/root/WebGLM/model/modeling_webglm.py”, line 35, in stream_query
refs = self.ref_retriever.query(question)
File “/root/WebGLM/model/retriever/init.py”, line 18, in query
search_results = self.searcher.search(question)
File “/root/WebGLM/model/retriever/searching/bing_search.py”, line 71, in search
return self._parse(query_bing(query))
File “/root/WebGLM/model/retriever/searching/bing_search.py”, line 43, in query_bing
results = get_bing_search_raw_page(question)
File “/root/WebGLM/model/retriever/searching/bing_search.py”, line 10, in get_bing_search_raw_page
browser = p.chromium.launch()
File “/usr/local/python3/lib/python3.8/site-packages/playwright/sync_api/_generated.py”, line 11678, in launch
self._sync(
File “/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_sync_base.py”, line 104, in _sync
return task.result()
File “/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_browser_type.py”, line 93, in launch
Browser, from_channel(await self._channel.send(“launch”, params))
File “/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_connection.py”, line 43, in send
return await self._connection.wrap_api_call(
File “/usr/local/python3/lib/python3.8/site-packages/playwright/_impl/_connection.py”, line 387, in wrap_api_call
return await cb()
File “/usr/local/python3/lib/python3.8/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:                                   ║
║     libdrm.so.2                                      ║
║     libgbm.so.1                                      ║
╚══════════════════════════════════════════════════════╝

解决方法:

yum install -y libdrm.so.2 libgbm.so.1

yum install -y libdrm libgbm
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

代码讲故事

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值