0

I recently upgraded to Ubuntu 20.04. I tried about 4 different commands to install Tor browser and the first 3 failed. Finally I found step-by-step instructions from HowToGeek.com and they worked perfectly.

The problem seems to be that one of my botched installation attempts messed up my list file. The error message I get when I try to install, reinstall or remove ANYTHING, including ubuntu-software (which does not launch at all), is:

E: Malformed entry 2 in list file /etc/apt/sources.list.d/tor-project.list (Component)
E: The list of sources could not be read.

I read many of these Q&A's and managed to find the actual line that is corrupted. The two lines read:

deb [arch=amd64] https://deb.torproject.org/torproject.org focal main
deb [arch=amd64] https://deb.torproject.org/torproject.org  main

How do I know what to change line 2 to? I thought maybe the issue was just an extra space between .org and main that I can see in the code but doesn't show up in the HTML above, but I changed it and still could not apt update.

Is it possible to just delete both lines since Tor itself is working perfectly already?

muru
  • 197,895
  • 55
  • 485
  • 740
Angele
  • 1
  • 4
    Remove the 2nd line. – Organic Marble Feb 07 '21 at 01:30
  • Thanks, Organic Marble! sudo apt update now works. – Angele Feb 08 '21 at 16:36
  • New error message:
    Get:39 https://deb.torproject.org/torproject.org focal InRelease [2,812 B]
    Err:39 https://deb.torproject.org/torproject.org focal InRelease
    The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810 Reading package lists... Done
    – Angele Feb 08 '21 at 16:38
  • Then,
    W: GPG error: https://deb.torproject.org/torproject.org focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 74A941BA219EC810 E: The repository 'https://deb.torproject.org/torproject.org focal InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    – Angele Feb 08 '21 at 16:38
  • sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys PUBKEY where PUBKEY is the long alphanumeric string from the error message – Organic Marble Feb 08 '21 at 16:46
  • Is this just for reference or should I copy and run in terminal (along with the long alphanumeric string)? Thanks. – Angele Feb 09 '21 at 18:48
  • That's how to fix it. – Organic Marble Feb 09 '21 at 19:26
  • Code ran with one error message. sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys PUBKEY 74A941BA219EC810 [sudo] password for k: Executing: /tmp/apt-key-gpghome.4zLgABS2Su/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys PUBKEY 74A941BA219EC810 gpg: "PUBKEY" not a key ID: skipping gpg: key EE8CBC9E886DDD89: public key "deb.torproject.org archive signing key" imported gpg: Total number processed: 1 gpg: imported: 1 Should I not have typed in the term PUBKEY but only the string of characters? Thanks. – Angele Feb 09 '21 at 22:26
  • Yes. replace the word PUBKEY with the long alphanumeric string from the error message – Organic Marble Feb 09 '21 at 22:32

0 Answers0