6

I have added these two lines in etc/apt/sources.list.d/webmin.list

 `deb http://download.webmin.com/download/repository sarge contribdeb`
 `http://download.webmin.com/download/repository sarge contrib`

Now, on running the "sudo apt-get update", i am getting the following errors:

 1. E: Type 'http://download.webmin.com/download/repository' is not known on  
    line 2 in source list /etc/apt/sources.list.d/webmin.list.
 2. E: The list of sources could not be read

Thanks in advance !!

Shalin
  • 89
  • 1
  • 1
  • 2

5 Answers5

19

I have also got this error:

sudo apt-get update 
E: Type 'mongodb-org/4.2' is not known on line 2 in source list /etc/apt/sources.list.d/mongodb-org-4.2.list
E: The list of sources could not be read.

I used following command -

  1. ls /etc/apt/sources.list.d/ you can see your all .list file like ls /etc/apt/sources.list.d/getdeb.list openjdk-r-ppa-trusty.list mongodb-org-4.2.list pcf-miro-releases-trusty.list nginx.list webupd8team-java-trusty.list

choose one of them have problem and remove using following command 2. sudo rm -r /etc/apt/sources.list.d/mongodb-org-4.2.list

Khalid Ali
  • 1,224
  • 1
  • 8
  • 12
user9697323
  • 201
  • 3
  • 6
5

OK to fix it, it's very simple:

sudo su
cd /etc/apt/sources.list.d/
ls

Now look for any file that has the word "webmin" or any name of repo that you don't use or causing issues.

rm <filename(s)>
apt update
apt upgrade

Congratulations, problem solved.

Krishh
  • 602
  • 1
  • 8
  • 25
Zack River
  • 51
  • 1
  • 3
2

More precisely,

deb http://download.webmin.com/download/repository sarge contribdeb

is correct because it starts with the word "deb" (or it could be "deb-src"), while

http://download.webmin.com/download/repository sarge contrib

does not start with a good keyword, and the error that shows up is just telling so:

1. E: Type 'http://download.webmin.c ...: what TYPE of repository is that? deb or deb-src?

UPDATE: Looking better: probably "contribdeb", the last word of the first line, should be split in two with the "deb" going to the start of next line.
In that case actually you pasted two times the same line, with the added bonus that you did it in the wrong way. BTW, two identical (but correct) lines in that file should not be a big problem.

1

To rectify this error all you need to do is the following:
1) rm /etc/apt/sources.list
2) nano /etc/apt/sources.list
3) paste the following and save:

deb http://http.kali.org/kali kali-rolling main non-free contrib
deb-src http://http.kali.org/kali kali-rolling main non-free contrib
deb http://http.kali.org/kali kali-rolling main non-free contrib

save the file.
4) sudo apt-get update

If this doesn't work wait for few days and try again as the link might be broken!

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Jeswill
  • 19
  • 1
-1

for 22.04 I used following command 1)ls /etc/apt/sources.list.d/ 2)sudo rm -r /etc/apt/sources.list.d/archive_uri-http_archive_canonical_com_-jammy.list then edit sources.list 3)nano /etc/apt/sources.list 4)paste the following at the end of list and save:

deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ jammy main 5)apt-get update