Curl fails installing keyring on Ubuntu 16.04 -- "(3) <url> malformed"

Description of the issue:
I’m an occasional Linux user trying to install Brave browser following the Release Channel instructions at https://brave.com/linux/ . I have Ubuntu 16.04.7 LTS installed via chroot on a Chromebook. the curl command is failing when I use the instructions provided with the error message “curl: (3) url malformed” .

How can this issue be reproduced?

  1. me@localhost:~$ sudo curl /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
  2. curl error is thrown, followed by a dump of incorrectly encoded text (unreadable).

I don’t get the expected echo output “deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main”|sudo tee /etc/apt/sources.list.d/brave-browser-release.list" .

When I move ahead with the apt update and apt install, the brave-browser install package is not found.

Am I missing something? Any help is appreciated.

1 Like

@ed.blattler,
It looks like you’re missing the -fsSLo flag at the beginning of the curl command. It should read

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

Thanks for pointing that out. I tried it with and without the flags. Neither works, but removing the flags shows the error message.

And just so we’re clear, the command right under that echo "deb... is a second command, not a response. So it should be

sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

[hit Enter]

echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list

[hit Enter]

heh heh! oops. “Occasional linux user” for sure. It’s installed now. Thanks again.

2 Likes

You’re very welcome, glad it was an easy fix!