26

I downloaded the 32-bit chromedriver version on my Ubuntu 12.04 machine.

However, it won't run and exits with the following message. I have searched various places on the internet but failed to find a solution.

./chromedriver: error while loading shared libraries: libXi.so.6: cannot open shared object file: No such file or directory
KJW
  • 15,035
  • 47
  • 137
  • 243

2 Answers2

90

libXi.so.6 is provided by libxi6. Chromedriver will then also ask for libgconf-2-4 with a similar message.

sudo apt-get install libxi6 libgconf-2-4

Whenever facing an issue of missing a specific file apt-file comes to rescue:

$ apt-file search libXi.so.6
libxi6: /usr/lib/x86_64-linux-gnu/libXi.so.6
libxi6: /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
libxi6-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libXi.so.6.1.0

This can be installed via apt-get:

sudo apt-get install apt-file && apt-file update  # install and fill the index
  • Thanks @ArtemBilan, I improved the answer. But I guess you pasted the wrong message template ;) –  Apr 11 '14 at 21:02
  • 1
    :-). Your trouble was in very short answer just with single line of code, without any explanations. I'm not well with Linux, but I see you edit your post. So, looks goods +1. – Artem Bilan Apr 11 '14 at 21:11
  • For me on Windows WSL `sudo updatedb` was required after installing `libxtst6`. Source: http://imadethisdesign.blogspot.com/2014/07/64-bit-linux-libxiso6-and-libxtstso6.html – Eyal Roth Jun 20 '19 at 12:38
  • Thanks @bartekbrak! – Victor Kironde Jan 07 '20 at 16:54
  • Major thanks for pointing out apt-file. Why have I never heard of this before?! – Ben Jan 27 '22 at 16:03
-1

Try this command, which will fix the minor issues in libraries. Worked for me.

sudo apt --fix-broken install
ndmeiri
  • 4,979
  • 12
  • 37
  • 45
harsha20599
  • 119
  • 3
  • 11