1

I was trying to install wine on my chromebook, when I encountered an issue. Currently when I try to execute any command I receive the error message:

E: Malformed line 1 in source list /etc/apt/sources.list (type)
E: Type 'echo' is not known on line 5 in source list /etc/apt/sources.list.d/winehq.list
E: The list of sources could not be read.
E: Malformed line 1 in source list /etc/apt/sources.list (type)
E: Type 'echo' is not known on line 5 in source list /etc/apt/sources.list.d/winehq.list
E: The list of sources could not be read.

Because of this, I'm unable to install the nano editing software to fix whatever issue there may be. I've searched the internet for a solution for quite awhile and I'm not sure what to do at this point. Any help would be greatly appreciated.

Edit

sed -n 5p /etc/apt/sources.list.d/winehq.list outputs sed: can't read /etc/apt/sources.list.d/winehq.list: No such file or directory

head -n1 /etc/apt/sources.list outputs tee

Edit 2

The first command outputs nothing, and prompts a new entry (leading me to believe it worked considering there is a new error now.)

Running update leaves me with:

E: Malformed line 2 in source list /etc/apt/sources.list (type)
E: The list of sources could not be read.
karel
  • 110,292
  • 102
  • 269
  • 299
Cole Jerum
  • 19
  • 2
  • Unfortunately it does not work, primarily because my system currently does not have nano installed, and when I attempt to install nano i get the exact same error message I stated above. – Cole Jerum Dec 21 '21 at 19:07
  • 1
    Then add the full output of `cat /etc/apt/sources.list` and `grep -r -v ^# /etc/apt//sources.list.d/ --include="*.list"` to the question. If long - use pastebin. What is your Ubuntu version? – N0rbert Dec 21 '21 at 19:31
  • 1
    You can install [nano](https://packages.ubuntu.com/) manually, save it somewhere, and `dpkg -i nano_*.deb` from the command line. –  Dec 21 '21 at 21:18
  • 5
    Does this answer your question? [How do I remove a malformed line from my sources.list?](https://askubuntu.com/questions/78951/how-do-i-remove-a-malformed-line-from-my-sources-list) – karel Dec 22 '21 at 06:09
  • Boot up a live linux and repair the file from this live session. – nobody Dec 22 '21 at 10:52

0 Answers0