Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list in Ubuntu 20.04

Dung Do Tien Aug 29 2021 240

Hello Guys, I am installing Elastic search and Kiban in Ubuntu 20.04. After run command:

echo “deb https://artifacts.elastic.co/packages/7.x/apt stable main” | sudo tee –a /etc/apt/sources.list.d/elastic-7.x.list

It ran successfully and then I run sudo apt-get update command I get an error Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list.

E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list
E: The list of sources could not be read.
E: Type '“deb' is not known on line 1 in source list /etc/apt/sources.list.d/elastic-7.x.list
E: The list of sources could not be read.

And I try any command I also get an error as above.

Anyone can explain to me why? And how to fix it?

Thanks for any suggestions.

Have 1 answer(s) found.
  • H

    Hoàng Nhật Duy Nguyễn Aug 29 2021

    I got the same error. I don't know why but I try to open file elastic-7.x.list by using command nano /etc/apt/sources.list.d/elastic-7.x.list and I see it has something as below:

    "deb https://artifacts.elastic.co/packages/7.x/apt stable main"
    deb https://artifacts.elastic.co/packages/7.x/apt stable main

    I don't know why it is double deb maybe I run command echo “deb https://artifacts.elastic.co/packages/7.x/apt stable main” | sudo tee –a /etc/apt/sources.list.d/elastic-7.x.list many times.

    So I remove the first command contain ""  and it solved for me.

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close