0

kmoin@kmoin-Inspiron-15-3567:~$ sudo apt-get update E: Malformed entry 1 in list file /etc/apt/sources.list.d/sublime-text.list (Suite) E: The list of sources could not be read.

Moin Khan
  • 49
  • 1
  • 2
  • 8

1 Answers1

1

You did not add a correct sources list file for Sublime. You have two options: Fix the file, or remove the file and not have Sublime on your system.


Fixing the file

The documentation from Sublime actually shows you need to have this as the contents of /etc/apt/sources.list.d/sublime-text.list:

deb https://download.sublimetext.com/ apt/TRACK/

where you replace TRACK with either stable or dev depending on which Sublime version track you want (stable for stable, dev for the in-development versions).

Go into the file specifically that you have now, and make sure to update it with the proper apt-formatted string.

Edit the file with this command:

sudo nano /etc/apt/sources.list.d/sublime-text.list

Edit the file according to the information I gave you above.

Hit CTRL + O once you've made the revisions, then hit the "Enter" key when it says "File name to Write" (which should already say sublimetext.list). Then hit CTRL + X to drop back to the terminal.

Now attempt your sudo apt-get update command - it should work then.


Removing the file

This one is easy:

sudo rm /etc/apt/sources.list.d/sublime-text.list

Now your apt-get update calls won't error. The side effect though is that you can't get Sublime Text installed then.

Thomas Ward
  • 74,764
  • @MoinKhan I had a typo in my file paths. Start over by attempting to repair the file. If it still doesn't work, then remove the file. Same steps as before, but with the updated file paths. (Note I cleared out no-longer-relevant comments) – Thomas Ward Apr 30 '18 at 16:10
  • but i want to ask you that can i install the sublime-text – Moin Khan Apr 30 '18 at 16:38
  • @MoinKhan if I have to answer every single tiny question you have because you don't want to do the research yourself, I'm going to get grumpy quickly. This time, it is time to go do your own research and read up on what Sublime says you should do to add the repositories. Pay attention to the "apt" section of that link. – Thomas Ward Apr 30 '18 at 16:39