0

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

woundrn
  • 21
  • 1
  • Use `nano` then edit and press Ctrl + x then y to save and exit – Raffa Apr 24 '20 at 23:08
  • still working on it. (I'm a nurse not a programmer, learning as I go) – woundrn Apr 24 '20 at 23:21
  • got into nano, but edit didnt do anything, looking at commands on bottom of terminal – woundrn Apr 24 '20 at 23:21
  • use it like so `sudo nano /etc/apt/sources.list` – Raffa Apr 24 '20 at 23:25
  • The file `/etc/apt/sources.list` isn't a user owned file, so you need to 'elevate' your privileges using `sudo` before the command to edit that file (or most files in fact outside your user directory). eg. `sudo gedit /etc/apt/sources.list` – guiverc Apr 24 '20 at 23:26
  • still working now I have ** (org.gnome.gedit:8932): WARNING **: 18:55:34.052: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (org.gnome.gedit:8932): WARNING **: 18:55:34.052: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported – woundrn Apr 24 '20 at 23:56

1 Answers1

0
  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 http://site.example.com/debian distribution component1 component2 component3
    deb-src http://site.example.com/debian 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.