Undetected_chromedriver don't exec at arm64 ec2?

48 Views Asked by At

I have a project that runs perfectly on my m2 Mac site using undetectable chromedriver. However, when I upload it to the ec2 machine, which is an arm64, I get the following error

"[Errno 8] Exec format error: '/root/.local/share/undetected_chromedriver/undetected_chromedriver'"

import undetected_chromedriver as uc

from xvfbwrapper import Xvfb
from utils.selenium.common.await_element import await_element
from utils.selenium.download.download import click_link_and_wait_download


class ChromeDriver(uc.Chrome):
    def __init__(self, headed=True, download_path=None):
        self.download_path = None
        self.__display = None
        self.__headed = headed

        if not self.__headed:
            self.headless()

        super().__init__()

        if download_path is not None:
            self.set_download_path(download_path)

    def headless(self):
        self.__display = Xvfb(width=1280, height=720, colordepth=16)
        self.__display.start()

    def kill(self):
        if not self.__headed:
            self.__display.stop()

        self.stop_client()
        self.quit()
...
0

There are 0 best solutions below