错误: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