Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS EC2 Linux: Cannot open shared object file

I am trying to get (specific versions of) Chrome and Chromedriver (and ultimately Selenium) running on an AWS EC2 Linux instance that was handed over to me for testing. Following the first four steps of this guide, I

  1. navigated into my /tmp directory,
  2. ran sudo wget https://chromedriver.storage.googleapis.com/102.0.5005.61/chromedriver_linux64.zip,
  3. unzipped chromedriver,
  4. and moved chromedriver into my /usr/bin.

However, when I go to inspect chromedriver - version for a sanity check, I get the following error:

chromedriver: error while loading shared libraries: libxcb.so.1: cannot open shared object file: No such file or directory

Several posts on this and other sites documenting similar quandaries (error while loading shared libraries: <...>) suggest that maybe this error is due to the absence of libxcb from my instance, but I am such a novice that I'm just not sure (I don't even know what libxcb is for). Hoping to get some feedback on how to proceed. If any other info about my instance would be helpful, feel free to let me know. Thanks!

like image 393
plimpa Avatar asked Dec 28 '25 21:12

plimpa


1 Answers

If you type yum whatprovides libxcb.so.1 you will see the name and version of the library that provides the file you are missing.

Generally, I found out that libX11 provides most libraries needed for chrome and chromedriver. So try:

sudo yum install -y libX11

and then repeat the above steps.

like image 161
mariotoss Avatar answered Dec 30 '25 23:12

mariotoss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!