1

Last week I typed in a command for /ect/apt/sources.list.d/playonlinux.list into my terminal and ever since then Ubuntu Software Center Keeps crashing. The report says

<class System Error> (E:Type'<!DOCTYPE' ia not known on line 1 in source list /etc/apt/sources.list.d/playonlinux.list)

I need help to prevent it from crashing.

0

1 Answer 1

2

I'm pretty sure the problem is you've added an incompatible source or text was added to your /ect/apt/sources.list.d/ directory. It's causing problems updating your software repo cache. Remove the added file/sources, then you should be able to update (apt-get update) normally.

The error sounds like there's some type of HTML on line 1 of /etc/apt/sources.list.d/playonlinux.list that got in there somehow; that shouldn't be there. If you know what lines or sources were added, you can use any text editor to edit the source files (sudo nano /etc/apt/sources.list.d/playonlinux.list for example), or a file browser to remove the whole file if it doesn't belong there.

This apt-get command should help, "it updates the package cache and checks for broken dependencies." and might reproduce your error message:

  • sudo apt-get check

    When I added some junk to my sources.list, it gave me this helpful info, pointing to the file & line that had the first error (after fixing run it again in case there's more errors):

    $ sudo apt-get check
    Reading package lists... Error!
    E: Type '<bd' is not known on line 4 in source list /etc/apt/sources.list
    E: The list of sources could not be read.
    E: The package lists or status file could not be parsed or opened.
    

Or you can use GUI tools to manage them (may not work if they're corrupted with HTML now) see this link for help https://help.ubuntu.com/community/Repositories/Ubuntu

Or this link for help using command line / terminal tools https://help.ubuntu.com/community/Repositories/CommandLine

Be very careful with your software sources, I'd make a backup copy of everything in /ect/apt/sources.list and /ect/apt/sources.list.d/ first, just in case. Not knowing what your Ubuntu version is I'm not sure what the "defaults" should be, or whether you've added extra PPA's or other sources.


Backup the sources.list files

Just copy them to a backup folder somewhere, in your home folder, or this should work:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.old
sudo cp -R /etc/apt/sources.list.d /etc/apt/sources.list.d.old


Restoring the default Ubuntu sources.list

  • For Ubuntu, if you do this it should generate a new fresh sources.list file

    1. delete the old files (sudo rm /etc/apt/sources.list and sudo rm -R /etc/apt/sources.list.d but BACKUP FIRST).

    2. Then do either of:

      • Run the Software Sources (from the programs menu / dash, or sudo software-properties-gtk or sudo software-sources) select/check-mark some repos, pick a server and update.

      • OR Generate a new one at http://repogen.simplylinux.ch/ using your version & country (to pick local mirrors), then copy & paste it into your new sources.list with
        gksudo gedit /etc/apt/sources.list
        or in a terminal with
        sudo nano /etc/apt/sources.list

The site http://repogen.simplylinux.ch/ has a LOT of optional PPA's too, looks quite useful. [courtesy How do I restore the default repositories? ]

8
  • Sorry about tthat it says <class System Error> (E:Type'<!DOCTYPE' ia not known on line 1 in source list /etc/apt/sources.list.d/playonlinux.list) . How would I go about removing the file/sources? Sorry Im a newbie here.
    – Woody
    Dec 20, 2014 at 6:27
  • to remove sources: Open software center, move mouse to very top of screen, tap edit tab, open "software sources" at bottom of menu, open "other software" tab. Scroll down as the newest additions appear to get added at bottom.
    – gyropyge
    Dec 20, 2014 at 6:30
  • My compute is giving my back to back crash reports because of this. Should I back up my files?
    – Woody
    Dec 20, 2014 at 6:30
  • edited answer with help on using/changing repos. Not sure why something keeps crashing, is update manager or something repeatedly trying to update the repos? Or a program installed from a non-Ubuntu-friendly repo?
    – Xen2050
    Dec 20, 2014 at 6:36
  • It appears that it keeps trying to update the playonlinux and it keeps crashing every time. It opens for maybe 3 seconds at most then closes.
    – Woody
    Dec 20, 2014 at 8:09

Not the answer you're looking for? Browse other questions tagged .