Open thanhnguyen2187 opened 1 year ago
One horrible way to work around this is to use nix-alien
to create a new shell with every libraries included:
nix-alien \
-l libdl.so.2 \
-l libpthread.so.0 \
-l libglib-2.0.so.0 \
-l libnss3.so \
-l libnssutil3.so \
-l libnspr4.so \
-l libm.so.6 \
-l libxcb.so.1 \
-l libgcc_s.so.1 \
-l libc.so.6 \
-l ld-linux-x86-64.so.2 \
-l libpcre2-8.so.0 \
-l libplds4.so \
-l libplc4.so \
-l librt.so.1 \
-l libXau.so.6 \
-l libXdmcp.so.6 \
/nix/store/91jlw0ppx0zbzwz01q6wdjqyakrz6kmf-system-path/bin/bash \
;
Replace .../bin/bash
with your shell, and then activate virtual environment, and then start working as usual.
In case you don't need/can't afford "hard automation" (auto login/captcha bypassing) and therefore don't truly need undetected-chromedriver
, you can try opening Chrome's WebDriver port like google-chrome-stable --remote-debugging-port=9222
, do the login/captcha entering, and then attach your "normal" Selenium code to do your automation:
options = webdriver.ChromeOptions()
options.add_experimental_option("debuggerAddress", "127.0.0.1:9222")
driver = webdriver.Chrome(options=options)
I encountered this confusing error and wanted to note the cause and solution here.
Executing the code gave:
Try executing the binary gave:
I was using zsh on NixOS and encountered this after
pip install undetected-chromedriver
. The problem was with the way NixOS handle paths, which makes some required C libraries missing:Manually adding the missing libraries and making them visible should help.