0

I was trying to add a repository in synaptic package manager and I end up with an error. This is what it shows when I open synaptic package manager.

E: Malformed line 1 in source list /etc/apt/sources.list (type)
E: The list of sources could not be read.
Go to the repository dialog to correct the problem.
E: _cache->open() failed, please report.

W: Ignoring file 'Macaulay2.list.save.3' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: Ignoring file 'Macaulay2.list.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: Ignoring file 'Macaulay2.list.save.4' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
W: Ignoring file 'Macaulay2.list.save.2' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension

Actually, I was trying to install a software called Macaulay 2 following online instruction.

1 Answers1

0

It means that your repository files have an invalid extension. you should have extensions like Macaulay2.list.save or Macaulay2.list in /etc/apt/sources.list.d/.

Rename these files in Terminal and then update repository:

sudo mv /etc/apt/sources.list.d/Macaulay2.list.save{.1,}  
sudo rm /etc/apt/sources.list.d/Macaulay2.list.save.{2,3,4}
sudo apt update
  • Sorry sir, I am new on ubuntu. Can you please explain how to undo what I did? I mean how to remove these packages.@Ghasem Pahlavan – Shahnawaz Ahmad May 14 '17 at 07:12
  • @ShahnawazAhmad please append output of this command to your Question to explain you how to remove this repository and add it again. ls /etc/apt/sources.list.d/ – Ghasem Pahlavan May 14 '17 at 07:42
  • This is what it shows aims-ubuntu-sagemath-xenial.list aims-ubuntu-sagemath-xenial.list.save Macaulay2.list.save ravefinity-project-ubuntu-ppa-xenial.list ravefinity-project-ubuntu-ppa-xenial.list.save – Shahnawaz Ahmad May 14 '17 at 08:07