【Selenium】How to solve "This version of ChromeDriver only supports Chrome version ***"

When running selenium I encountered the error message "This version of ChromeDriver only supports Chrome version 84", and here is how I solved.

1. Check the version of Google Chrome

google-chrome --version
(or if you haven't set a path, "/usr/bin/google-chrome --version")

In my case, the result of above command was like this.

Google Chrome 90.0.4430.212

2. Check the version of Chrome Driver supporting your Google Chrome version by checking the info below.
chromedriver.chromium.org

My version of Google Chrome was 90, so that the version of Chrome Driver is "ChromeDriver 90.0.4430.24" as below.
f:id:daylambsbecomelions:20210522114120p:plain

3. Download the required version of Chrome Driver

curl -O https://chromedriver.storage.googleapis.com/90.0.4430.24/chromedriver_linux64.zip

=>replace "90.0.4330.24" part accordingly

4. Unzip the zip file and move the unzipped file to bin folder

unzip chromedriver_linux64.zip
mv chromedriver /usr/local/bin/
rm chromedriver_linux64.zip