0

When I execute

sudo apt-get update

I get the following error:

E: Type 'ain' is not known on line 3 in source list /etc/apt/sources.list.d/diesch-testing-precise.list  
E: The list of sources could not be read.

How can I fix this?

zx485
  • 2,426
  • Possible off-topic question. Ubuntu 12.04 LTS (Precise) is well past EOL and off-topic, 12.04 ESM (Precise) is off-topic too. If you're not using 12.04, you should tells us your Ubuntu version, as only supported (and not paid support such as 12.04 ESM) versions are on-topic here (see https://askubuntu.com/help/on-topic) [I looked in https://launchpad.net/~diesch/+archive/ubuntu/testing and didn't see any other more likely reason] – guiverc Sep 17 '18 at 22:26

1 Answers1

1

The error message is telling you that there is a problem with one of your configuration files. It is kind enough to provide the file in the error. If you do not look at the file, and if you do not show us what line three in the file says, there isn't much anybody can do.

You could use an editor such as nano or vim to look at the file, or you could have the terminal spit out the file contents using cat:

cat /etc/apt/sources.list.d/diesch-testing-precise.list

You may notice the issue and be able to fix it, but please edit your question to include the file entirely, or at least the third line. Have you recently upgraded your system? It may be easier to remove that repository, and re-add it now that you're on a new version.

sudo add-apt-repository -r ppa:diesch/testing # Remove repo
sudo add-apt-repository ppa:diesch/testing # Add repo

Another option is to stick with official Ubuntu repositories, and to limit the number of third party repositories that you use. This will result in a more stable, standard system that others are familiar with to help you, and is the ideal setup for new and old users alike. (No offense to all the hard work put in by Diesch and others.)

earthmeLon
  • 11,247