How can I fix Malformed line (54) when gedit wont load? [duplicate]

Malformed line (54) error message gedit not running, cannot fix as line editor will not load.

I cannot load any new software or programs.

gedit worked before when I was in dual boot but I wiped the detested windows 10, in doing so and moving partitions I had to reinstall ubuntu from thumb drive.

When I started to try to load previously running programs that is when the trouble started.

I dont know if my hand stuttered and placed an extra character somewhere?

enter image description here

6

1 Answer

  1. Open a terminal.
  2. Insert the command sudo nano /etc/apt/sources.list, will ask for your password.
  3. Press Ctrl+_¹ and insert the number of the line: 54. Press Enter.

    Anything which doesn't fit this format is incorrect.

    # Comment, marked by a line starting with '#'
    deb distribution component1 component2 component3
    deb-src distribution component1 component2 component3

    The URL, distribution and components will be different. It does not necessarily have to have 3 components.

  4. Correct the line, and once corrected, press Ctrl+o (saves the file) and then Ctrl+x (exits nano).

  5. Run sudo apt update to check the problem has been solved.


¹You may have to press Ctrl+Shift+- to get the _. I can't be sure because I use a spanish keyboard.

2

You Might Also Like