2

I'm new to Linux and was attempting to install the Brave Browser using the instructions on the website, listed below:

curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key add -

echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ `lsb_release -sc` main" | sudo tee /etc/apt/sources.list.d/brave-browser-release-`lsb_release -sc`.list

sudo apt update

sudo apt install brave-browser brave-keyring

https://brave-browser.readthedocs.io/en/latest/installing-brave.html#linux

This didn't work, so I tried playing around with it, i.e changing the commands a bit, and in my disgusting ignorance I made bad boo boo... now every time I try to install an app from the app center I get this error:

E: Type 'sudo' is not known on line 1 in source list
/etc/apt/sources.list.d/brave-browser-release-juno.list E: The list of
sources could not be read

I went to /etc/apt/sources.list.d/ and behold: a new .list file called brave-browser-release-juno.list - I opened it and there is one line in the file: sudo apt update, that's all it says. Sadly Elemenary won't read any of the other lists now, and I cannot figure out how to delete this new unwanted .list file.

Can somebody smarter than me please advise?

How do I restore this folder to its default state?

1

You failed writing the command and also the command, even if you write it well, will not work for elementary as it is.

To fix it and then install Brave through apt, open a terminal and write and execute:

$ sudo rm -fr /etc/apt/sources.list.d/brave-browser*

then

$ echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/bionic main" | sudo tee /etc/apt/sources.list.d/brave-browser-release-bionic.list

that should fix the problem


now you can continue installing Brave as the website says

$ sudo apt update

$ sudo apt install brave-browser brave-keyring


Remember that elementaryOS is based on Ubuntu but isn't Ubuntu, so the command $ lsb_release -sc in Ubuntu 18.04 answers bionic and in elementary juno. That repo expected bionic as keyword


UPDATE

I recommend you to write Brave Browser staff to write instructions for elementary changing the command lsb_release -cs to lsb_release -csu

$ lsb_release -csu
bionic

$ lsb_release -cs
juno
-2

1) install software-properties-common

2) run software-properties-gtk

3) Click the "Other Software" tab.

4) uncheck the bad repository

To install Brave using apt, check out mtsfaria's the answer to this question:

Brave Browser and repo update

That solution worked for me.

To install Brave using snap, run sudo snap install brave

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.