Is Tor Browser installation broken?

Running Tor Browser on Ubuntu 20.04 results in this output:

$ torbrowser-launcher 
Tor Browser Launcher
By Micah Lee, licensed under MIT
version 0.3.2
https://github.com/micahflee/torbrowser-launcher
Downloading Tor Browser for the first time.
Downloading https://aus1.torproject.org/torbrowser/update_3/release/Linux_x86_64-gcc3/x/en-US
Latest version: 10.0
Downloading https://dist.torproject.org/torbrowser/10.0/tor-browser-linux64-10.0_en-US.tar.xz.asc
Downloading https://dist.torproject.org/torbrowser/10.0/tor-browser-linux64-10.0_en-US.tar.xz
Verifying Signature
Refreshing local keyring...
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py", line 589, in verify
    c.verify(signature=sig, signed_data=signed)
  File "/usr/lib/python3/dist-packages/gpg/core.py", line 541, in verify
    raise errors.BadSignatures(results[1], results=results)
gpg.errors.BadSignatures: 110775B5D101FB36BC6C911BEB774491D9FF06E2: Key expired

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py", line 600, in run
    verify()
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py", line 594, in verify
    raise Exception
Exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/launcher.py", line 603, in run
    self.common.refresh_keyring()
  File "/usr/lib/python3/dist-packages/torbrowser_launcher/common.py", line 196, in refresh_keyring
    p = subprocess.Popen(['/usr/bin/gpg2', '--status-fd', '2',
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/gpg2'

How do I fix this?


Solution 1:

UPDATE: As of October 12, 2020, at approximately 09:00 UTC, the version of 0.3.2-9ubuntu1 was released to the focal-updates repository and a fixed version should be available in Focal by doing a sudo apt update && sudo apt install torbrowser-launcher.

This is a known issue - one of several current ones - in the Tor Browser launcher package in Focal. This bug, as well as three other bugs, have a fix pending in the -proposed repository that will address this and other issues:

  • Tor does not download and install; repeated signature verification failed
    • This issue makes it so that the in-built download of Tor Browser from the Tor site doesn't verify against their signing key - that's because the signing key changed, which caused it to fail to install. We fix that in this bug in the SRU.
  • torbrowser-launcher has missing gnupg dependency (re: no gpg2 binary)
    • This is the cause of your problem - gnupg2 is a transitional package and Tor Browser upstream hasn't caught up with that for Ubuntu, so this bug hits you with the errors you're seeing - we're patching this to use the base gnupg binary instead which is the same as gnupg2 now.
  • Version checking error in torbrowser-launcher since Tor Browser 10.0 was released
    • In recent weeks/months, Tor Browser 10 has been released, and the old version checking failed on Tor Browser 10 so that 10 was seen as 'older'. They've adjusted the way this is handled upstream, and we'll patch this too.
  • Apparmor profile prevents Tor Browser from loading libstdc++.so.6 since Tor Browser 10.0 was released
    • The profile protecting unauthorized access for Tor Browser to other files and libraries didn't let the requisite C++ libraries get loaded into memory, preventing Tor Browser from starting up. That's also patched in the SRU that's pending.

The issues you've encountered about no gpg2 being available is fixed in the proposed repository thanks to the second bug in the list above. It has to go through Stable Release Update verification now before the fix is released into the -updates repository for general availability.

All the aforementioned bugs will be fixed when the release of 0.3.2-9ubuntu1 is made from focal-proposed to the focal-updates repository for 20.04