1

when I run

sudo apt-get update

I get this :

Reading package lists... Done
N: Ignoring file 'google.list.save.1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
N: Ignoring file 'gcl' in directory '/etc/apt/sources.list.d/' as it has no filename extension

I tried to fix it by

sudo mv /etc/apt/sources.list.d/google-chrome.list /etc/apt/sources.list.d/gcl

but I received this :

mv: cannot stat '/etc/apt/sources.list.d/google-chrome.list': No such file or directory

how to fix this ?

9
  • 1
    First, ask yourself how you made those non-existent sources. They likely did not make themselves. Looks like you somehow managed to mangle a Google Chrome source. Once you identify what source it really should be, fix the file. Or delete the file.
    – user535733
    Mar 7, 2020 at 23:15
  • @user535733 after I wrote cd /etc/apt then grep -rw karmic * this appeared "grep: sources.list.d/google.list.save.1: Permission denied grep: sources.list.d/google.list.save: Permission denied" so I think the problem is in this two sources Mar 7, 2020 at 23:22
  • 1
    That command did not make the bad sources. It merely found them already made.
    – user535733
    Mar 7, 2020 at 23:25
  • how to find the bad sources? I've searched but didn't find a way Mar 7, 2020 at 23:44
  • You know the bad sources. You told them to us: /etc/apt/sources.list.d/google.list.save.1 and /etc/apt/sources.list.d/gcl. Read those files to see if they are something you want to keep, or if you recall how/why you made them. If not, delete them.
    – user535733
    Mar 7, 2020 at 23:47

1 Answer 1

2

Fix it this way...

cd /etc/apt/sources.list.d/ # change directory

sudo mv gcl google-chrome.list # rename it back to original

sudo rm -i google.list.save.1 # delete this bad .save file

ls -al *chrome*.list # confirm you only have one such .list file

Update #1:

  • The contents of the /etc/apt/sources.list.d/google-chrome.list file that you deleted was:

sudo -H gedit /etc/apt/sources.list.d/google-chrome.list # recreate this file

deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main

  • And the file at /etc/cron.daily/google-chrome, should have the following line modified:

sudo -H gedit /etc/cron.daily/google-chrome # edit this file

Change this:

REPOCONFIG="deb http://dl.google.com/linux/chrome/deb/ stable main"

To this:

REPOCONFIG="deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
3
  • when I write: "deb [arch=amd64] dl.google.com/linux/chrome/deb stable main" this message appears on terminal: "** (gedit:3176): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported" Mar 8, 2020 at 11:21
  • @MohamedAhmed04 It's probably just noise. Edit the file again with sudo -H gedit /etc/apt/sources.list.d/google-chrome.list and see if the contents are as intended.
    – heynnema
    Mar 8, 2020 at 14:37
  • @MohamedAhmed04 You're very welcome.
    – heynnema
    Mar 8, 2020 at 18:28

You must log in to answer this question.

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