Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

The install-dev-dependencies.sh is unable to create symbolic link to chromedriver on the latest installation of Ubuntu 18.04 #19174

@ShenZhouHong

Description

@ShenZhouHong

Type: code issue

Description

./install-dev-dependencies.sh is unable to create the final symlink, due to
the /usr/lib/chromium/chromedriver not being found:

shen@ubuntu18-test:~/https-everywhere$ ./install-dev-dependencies.sh

Warning: Installing the development dependencies for HTTPS Everywhere
may alter your system, installing requirements both within the package
management system and also external binaries.

Are you sure you want to continue? [y/N]: y

[sudo] password for shen:
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease

...

Processing triggers for libc-bin (2.27-3ubuntu1) ...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   645  100   645    0     0   3623      0 --:--:-- --:--:-- --:--:--  3623
100 2828k  100 2828k    0     0  1000k      0  0:00:02  0:00:02 --:--:-- 2485k
geckodriver
ln: failed to create symbolic link '/usr/lib/chromium/chromedriver': No such file or directory

Specifically, the installation step that does not complete is:

if [ ! -f /usr/lib/chromium/chromedriver ] && [ -f `which chromedriver` ]; then
  $SUDO_SHIM ln -s `which chromedriver` /usr/lib/chromium/chromedriver
fi

Where which chromedriver outputs /usr/bin/chromedriver, which appears to be
correct. However /usr/lib/chromium does not exist as a directory in
/usr/lib at all.

Instead, there is an alternative directory that is available in
/usr/lib/chromium-browser, that already contains a symbolic link
/usr/lib/chromium-browser/chromedriver, which points to:

shen@ubuntu18-test:/usr/lib/chromium-browser$ file chromedriver
chromedriver: symbolic link to ../../bin/chromedriver

Which is actually /usr/bin/chromedriver, the original symbolic link that the
./install-dev-dependencies.sh script tries to create but fails.

Effects of this issue

Although there already exists a proper symlink at the new location, it is not possible to safely ignore this issue. Because ./install-dev-dependencies.sh fails before actually completing, the final steps involving git submodules and pip dependency installations are not complete. Hence, the development environment is not properly setup, and attempting to run test.sh will run into errors, as critical dependencies are missing:

...

+ xvfb-run python3.6 test/script.py Chrome
Traceback (most recent call last):
  File "test/script.py", line 14, in <module>
    from selenium import webdriver
ImportError: cannot import name 'webdriver'

...

Environment

Tested and reproduced on a fresh installation of Ubuntu 18.04 server installed
from an ubuntu-18.04.4-live-server-amd64.iso, with the latest updates.

Likewise, this issue has been tested and reproduced on a fresh installation of Ubuntu 18.04 Desktop

Note: This issue does not appear reproduce on Ubuntu 16.04 server, nor Ubuntu
14.04 server. There are seperate issues with those two operating systems, and
I will file issues regarding them a bit later.

Steps to reproduce

On a freshly installed Ubuntu 18.04 server environment, attempt to run the
./install-dev-dependencies.sh script:

git clone https://github.com/EFForg/https-everywhere.git
cd https-everywhere/
bash ./install-dev-dependencies.sh

The final output when the script exits should be:

ln: failed to create symbolic link '/usr/lib/chromium/chromedriver': No such file or directory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions