---
slug: "python-selenium-chromedriver-error-127-install-libgconf2"
title: "Install libgconf2 if Python Selenium ChromeDriver Fails to Start with Error 127"
description: "Ubuntu 14.04"
url: "https://www.ytyng.com/en/blog/python-selenium-chromedriver-error-127-install-libgconf2"
publish_date: "2017-09-11T08:35:49Z"
created: "2017-09-11T08:35:49Z"
updated: "2026-02-27T09:46:26.847Z"
categories: ["Django", "Linux"]
keywords: ""
featured_image_url: "https://media.ytyng.com/resize/20250605/b922cbda61c5449e895726a32f67b5bc.png.webp?width=768"
has_video: true
has_music: true
video_urls: ["https://media.ytyng.net/ytyng-blog/117/featured-video-1.mp4", "https://media.ytyng.net/ytyng-blog/117/featured-video-2.mp4", "https://media.ytyng.net/ytyng-blog/117/featured-video-3.mp4"]
music_urls: ["https://media.ytyng.net/ytyng-blog/117/featured-music-117-3.mp3", "https://media.ytyng.net/ytyng-blog/117/featured-music-117-4.mp3"]
lang: "en"
---

# Install libgconf2 if Python Selenium ChromeDriver Fails to Start with Error 127

Ubuntu 14.04

When trying to launch Selenium ChromeDriver with Python:

```bash
$ xvfb-run ipython
```

```python
In [3]: from selenium.webdriver import Chrome

In [4]: d = Chrome()
---------------------------------------------------------------------------
WebDriverException                            Traceback (most recent call last)
<ipython-input-4-0dc1ed148f2d> in <module>()
----> 1 d = Chrome()

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.pyc in __init__(self, executable_path, port, chrome_options, service_args, desired_capabilities, service_log_path)
    60                  service_args=service_args,
    61                  log_path=service_log_path)
---> 62                  self.service.start()
    63 
    64                  try:

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.pyc in start(self)
    94                  count = 0
    95                  while True:
---> 96                      self.assert_process_still_running()
    97                      if self.is_connectable():
    98                          break

/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.pyc in assert_process_still_running(self)
    107                      raise WebDriverException(
    108                          'Service %s unexpectedly exited. Status code was: %s'
--> 109                          % (self.path, return_code)
    110                      )
    111 

WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
```

First, try launching chromedriver on its own:

```bash
$ chromedriver
chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory
```

→ Launch failed

Install libgconf2:

```bash
$ apt search libgconf

...

$ sudo apt install libgconf2-4
```

Try launching chromedriver again:

```bash
$ chromedriver
Starting ChromeDriver 2.29.461571 (8a88bbe0775e2a23afda0ceaf2ef7ee74e822cc5) on port 9515
Only local connections are allowed.
```

Launched successfully!

Run from Python again:

```bash
$ xvfb-run ipython
```

```python
In [1]: from selenium.webdriver import Chrome

In [2]: d = Chrome()

In [3]:
```

Launched successfully!
