- 运行 chromedriver 在 mac 上时出错- 不是有效标识符 - IPv4 端口不可用

-error when running chromedriver on mac- not a valid identifier - IPv4 port not available

当我尝试 运行 Chromedriver.exe 时,终端出现此错误。用于网页抓取。 Java 开发包有问题吗?

-bash: export: `/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home': **not a valid identifier**

/Users/mac/Desktop/URBAN/winterbreak2018/web_scraping/chromedriver ; exit;
macs-MacBook-Pro:~ mac$ 

/Users/mac/Desktop/URBAN/winterbreak2018/web_scraping/chromedriver ; exit;

Starting ChromeDriver 2.45.615355 (d5698f682d8b2742017df6c81e0bd8e6a3063189) on port 9515

Only local connections are allowed.

[1548565873.673][SEVERE]: bind() failed: Address already in use (48)

IPv4 port not available. Exiting...

logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Deleting expired sessions...12 completed.

[Process completed]

很可能 Chromedriver 没有正确关闭,除非有其他东西使用该端口。

运行 usr/libexec/java_home -V 查看甚至使用了哪个虚拟机。