Home > Backend Development > Python Tutorial > How to Fix \'WebDriverException: Service chromedriver unexpectedly exited\' on Linux Servers?

How to Fix \'WebDriverException: Service chromedriver unexpectedly exited\' on Linux Servers?

Susan Sarandon
Release: 2024-10-26 07:30:03
Original
1099 people have browsed it

 How to Fix

WebDriverException: Service chromedriver unexpectedly exited

When attempting to utilize Selenium to create a crawler on a server, encountering the error:

WebDriverException                        Traceback (most recent call last)
...
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
Copy after login

indicates that additional libraries are required for the proper functioning of Chromedriver. To resolve this issue, the following command can be executed:

apt-get install -y libglib2.0-0=2.50.3-2 \
    libnss3=2:3.26.2-1.1+deb9u1 \
    libgconf-2-4=3.2.6-4+b1 \
    libfontconfig1=2.11.0-6.7+b1
Copy after login

Alternatively, one can iteratively run Chromedriver from the command line and utilize the apt-cache search and apt-cache madison commands to identify the precise versions of the required deb packages.

Additional Note

The specific packages required may vary depending on the Chromedriver version in use. Using the ldd command to list the shared object dependencies can also be helpful in identifying missing libraries.

The above is the detailed content of How to Fix 'WebDriverException: Service chromedriver unexpectedly exited' on Linux Servers?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template