title: WebDriverException: no chrome binary at /usr/bin/google-chrome-stable or chrome binary not found
body: <p>I am executing selenium test via Jenkins server in AWS Ubuntu.</p>
  
  <p>I was getting chrome binary not found error so I set chrome binary in my code. </p>
  
  <pre><code>System.setProperty("webdriver.chrome.driver","/var/lib/jenkins/.m2/repository/webdriver/chromedriver/linux64/83.0.4103.39/chromedriver");    
  DesiredCapabilities capabilities = new DesiredCapabilities();
  capabilities.setCapability("applicationCacheEnabled", true);
  ChromeOptions options = new ChromeOptions();
  options.merge(capabilities);
  options.setBinary("/usr/bin/google-chrome-stable");
  options.addArguments("--headless");
  options.addArguments("--no-sandbox");
  options.addArguments("--remote-debugging-port=9222");
  options.addArguments("--disable-infobars"); 
  options.addArguments("--disable-dev-shm-usage"); //Linux 
  options.addArguments("--disable-browser-side-navigation"); 
  options.addArguments("--disable-gpu"); //Windows
  options.addArguments("--disable-web-security");
  driver = new ChromeDriver(options);
  </code></pre>
  
  <p>Then the error changed to: no chrome binary at /usr/bin/google-chrome-stable</p>
  
  <pre><code>Starting ChromeDriver 83.0.4103.39 (ccbf011cb2d2b19b506d844400483861342c20cd-refs/branch-heads/4103@{#416}) on port 14665
  Only local connections are allowed.
  ChromeDriver was started successfully.
   INFO [main] (ControlCenter.java:108)- START
  [ERROR] Tests run: 4, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 2.116 s &lt;&lt;&lt; FAILURE! - in TestSuite
  [ERROR] com.info.end2end.ExcelAccountToFusion.onTestSetup  Time elapsed: 2.032 s  &lt;&lt;&lt; FAILURE!
  org.openqa.selenium.WebDriverException: 
  **unknown error: no chrome binary at /usr/bin/google-chrome-stable**
  Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
  System info: host: 'jenkins-it02', ip: '10.113.0.187', os.name: 'Linux', os.arch: 'amd64', os.version: '5.3.0-1019-aws', java.version: '11.0.7'
  Driver info: driver.version: ChromeDriver
  </code></pre>
  
  <p>This is how my usr/bin is: 
  <a href="https://i.stack.imgur.com/ZDJbd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZDJbd.png" alt="binary folders"></a></p>
  
  <p>And this is message when I try to launch browser in command line:
  <a href="https://i.stack.imgur.com/UU0Kz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UU0Kz.png" alt="launch chrome"></a></p>
  
  <p>I tried the solution given by @DebanjanB at <a href="https://stackoverflow.com/questions/50138615/cannot-find-chrome-binary-with-selenium-in-python-for-older-versions-of-google-c">Cannot find Chrome binary with Selenium in Python for older versions of Google Chrome</a> but no luck. Any help is much appreciated as I have spent 2 days on this already. </p>