【发布时间】:2025-12-03 17:45:02
【问题描述】:
我已经在 CentOS 5.5 x86_64 机器上安装了 python 2.7。
$ file /opt/python2.7.1/bin/python
/opt/python2.7.1/bin/python: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped
然后我使用 selenium Web 驱动程序运行基本登录脚本,但它失败并出现以下错误。
selenium.common.exceptions.WebDriverException: Message: 'The browser appears to have exited before we could connect. The output was: Failed to dlopen /usr/lib/libX11.so.6\ndlerror says: /usr/lib/libX11.so.6: wrong ELF class: ELFCLASS32\n'
为什么它使用 32 位 X11 库而不是 64 位 X11 库?如何让 python 使用 64 位库?
【问题讨论】:
-
标志被移除,请参考FAQ
标签: python selenium 64-bit webdriver