Score:0

tee: invalid option -- 'f'

fi flag
sudo echo «deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx» \  | sudo tee /etc/apt/sources.list.d/nginx.list curl -fsSL https://nginx.org/keys/nginx_s

tee: invalid option -- 'f'

How to fix issue that I have while trying to 'add nginx repository'?

Score:3
us flag

I presume, you are following the Ubuntu package install from here.

There are multiple issues in your command line:

sudo echo «deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx» \ 
   | sudo tee /etc/apt/sources.list.d/nginx.list \
   curl -fsSL https://nginx.org/keys/nginx_s
  • « and » are invalid symbols in this context. I presume, you wanted to use "
  • The curl instruction is missing a separation from the tee command. This is why the -f from curl -fsSL is used by tee - adding a ; or && between tee and curl would fix this, but the curl command does not make sens at all. It try's to fetch a key and write it to stdou, but the URL is invalid.

Try it as described on the homepage of Nginx:

  • Install the key first
    curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
      | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null
    
  • Add the repository to apt
    echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
    http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
      | sudo tee /etc/apt/sources.list.d/nginx.list
    
  • Update the database
    sudo apt-get update
    
  • Install nginx
    sudo apt install nginx
    
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.