簡體   English   中英

Java 中的 ChromeDriver 實例化永遠掛起?

[英]ChromeDriver instantiation in Java hangs forever?

來自官方 Google Selenium Wiki (http://code.google.com/p/selenium/wiki/ChromeDriver) 的示例代碼片段都不適合我。 通過獨立啟動 Selenium 服務器或使用 ChromeDriverService,它會掛在“new RemoteWebDriver(...)”行。 這是我控制台上的 output:

/tmp/chromedriver: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker waitUntilAvailable
INFO: Waiting for [Ljava.net.URL;@16df84b
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:21461/status
Jun 29, 2011 8:46:58 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:21461/healthz
Jun 29, 2011 8:46:59 AM org.openqa.selenium.net.UrlChecker$1 call
INFO: Polling http://localhost:21461/status
...

它永遠在輪詢healthz和status嗎?

zilupe 的回答讓我找到了 32 位 CentOS 的正確答案:

sudo ln -s /lib/libbz2.so.1 /usr/lib/libbz2.so.1.0

如果你有 64 位 CentOS,他大概是對的

我相信這個線程與您遇到的問題相同: http://code.google.com/p/chromium/issues/detail?id=13425

我有一個類似的問題。 我的 Fedora 在 /lib64/ 目錄中有 libbz2.so.1,而 Chrome 在 /usr/lib64/ 中尋找它

解決方案是創建一個符號鏈接:

sudo ln -s /lib64/libbz2.so.1 /usr/lib64/libbz2.so.1.0

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM