Tor Install Unsuccessful

Hello all, I have been running FreedomBox successfully now with a few of the apps. I’m trying to add Tor and it is erroring out. Can anyone help with the following?

Problem Description
I am installing Tor through the Freedombox Apps dashboard but it errors out.

Steps to Reproduce
N/A - clicking Tor install

Expected Results
Clean install

Actual results
I get an error with the following message:
Error installing application: (‘tor’, ‘’, ‘Traceback (most recent call last):\n File “/usr/share/plinth/actions/tor”, line 538, in \n main()\n File “/usr/share/plinth/actions/tor”, line 534, in main\n subcommand_method(arguments)\n File “/usr/share/plinth/actions/tor”, line 72, in subcommand_setup\n _first_time_setup()\n File “/usr/share/plinth/actions/tor”, line 79, in _first_time_setup\n _disable_apt_transport_tor()\n File “/usr/share/plinth/actions/tor”, line 467, in _disable_apt_transport_tor\n for uri_path in iter_apt_uris(aug):\nUnboundLocalError: local variable 'aug' referenced before assignment\n’)

Information

  • FreedomBox version: You are running Raspbian GNU/Linux 11 (bullseye) and FreedomBox version 21.4.4. FreedomBox is up to date.
  • Hardware: Rasperry Pi B+
  • How did you install FreedomBox?: I’ve forgotten now, it was by CLI or an image. Freedombox is working successfully with TT-RSS and Radicale and in general.

Any ideas what might be happening/how I can fix?

Thank you all!

+1 for this error; I attempted to install the Tor app this evening and encountered the same issue.

Error installing application: (‘tor’, ‘’, ‘Traceback (most recent call last):\n File “/usr/share/plinth/actions/tor”, line 542, in \n main()\n File “/usr/share/plinth/actions/tor”, line 538, in main\n subcommand_method(arguments)\n File “/usr/share/plinth/actions/tor”, line 72, in subcommand_setup\n _first_time_setup()\n File “/usr/share/plinth/actions/tor”, line 79, in _first_time_setup\n _disable_apt_transport_tor()\n File “/usr/share/plinth/actions/tor”, line 470, in _disable_apt_transport_tor\n for uri_path in iter_apt_uris(aug):\nUnboundLocalError: local variable 'aug' referenced before assignment\n’)

:point_up_2: “local variable 'aug'” has some backslashes that Discourse is interpreting as markdown and removing from the error message, see the screenshot:

I opened the referenced file /usr/share/plinth/actions/tor and looked at a few of the lines noted in the error message, but I honestly have no idea what I’m looking at. If there is a typo or something in there I would have no idea.

I rebooted the box but it did not change the result.

Information
Debian 11, FreedomBox version 22.15

Hardware
Olimex A20-OLinuXino-LIME2 board

How did you install FreedomBox?
Pre-installed version.

1 Like

@ntfz I’m not sure if you saw it, but Sunil replied in the issue Benedek opened (in the link above), saying:

This failure to create augeas instances happens under two conditions:

  • When the new Deb822 format sources files are present: /etc/apt/sources.list.d/*.sources . These files are not yet understood.
  • When there are errors parsing the old format files: /etc/apt/sources.list or /etc/apt/sources.list.d/*.list

I took a peek in /etc/apt/sources.list.d and /etc/apt/sources on my box and did not see any .sources files at all–I think probably I do not have any of the “new Deb822 format sources files” Sunil mentioned.

I took a look through the .list files, thinking maybe I could spot something odd that is causing the parsing error Sunil referenced; the only thing that stood out to me was my tailscale.list file that looks like this:

# Tailscale packages for debian bullseye
deb [signed-by=/usr/share/keyrings/tailscale-archive-keyring.gpg] https://pkgs.tailscale.com/stable/debian bullseye main

The second line looks a bit clunkier than the other .list files I have, so I took a guess and commented it out. After commenting out the line, I was able to install the Tor app! :tada:

I uncommented the line afterward and ran a normal sudo apt update && sudo apt upgrade with no issues. Tailscale and Tor are both up and appear to be working fine so it may have just been a hiccup with how the app gets installed.

3 Likes

Thanks @BluishHumility! That precisely points the problem. This is an issue in augeus lens that we are using to parse the sources file. I shall report this issue to them and try to fix it.

3 Likes

Thanks for breaking the technical component down for me @BluishHumility. I will try this and report back, I suspect it will work for me, too. And thank you Sunil for providing the specifics!

I checked in on my /etc/apt/sources.list and /etc/apt/sources.list.d

In the latter I only had a docker.list and raspi.list. I tried commenting out each of their lines (each had one) and got the same parsing error.

The former has just one item:
deb Index of /raspbian bullseye main contrib non-free rpi
[I tried commenting that out, too, but the install failed for different reasons]

Those had not fixed the issue with installing Tor, in my case. I did not have the Tailscale item in my list to comment out.