Announcement

Collapse
No announcement yet.

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists...

    Has anybody else noticed the above warning/error when trying sudo apt-get update lately (if you have Google Chrome installed)? The update process fails because of this.

    I found out that the cause is Google dropping support and removing the repository for the 32bit version of Google Chrome (see here for more info: http://www.omgubuntu.co.uk/2016/01/g...t-discontinued). Even if you are using a 64bit distro and have the 64bit version of Chrome installed (as do I) it will still affect you.

    I found a fix for the problem here http://www.omgubuntu.co.uk/2016/03/f...t-error-ubuntu

    This is from the Featured Comment on that page, which is correct for the Stable version of Chrome:

    Code:
    Easy way..
    sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"
    sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/opt/google/chrome/cron/google-chrome"
    BUT ....

    Unfortunately this is immediately over-written by the Chrome update process making the fix temporary. I found a more comprehensive fix further down on that page which expands on the above and is working for me so far:

    Code:
    1. Open a terminal and run "cd /etc/default" , then "sudo nano google-chrome"
    
    2. In the config file, change the 2nd line: "repo_reenable_on_distupgrade="true" so that it is false, as in
    repo_reenable_on_distupgrade="false", then save the config file.
    
    3. Now, you can make the edit to the repo as instructed above. Since you're already in a terminal window, it is easier to run the commands provided by eMcE above:
    
    sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/etc/apt/sources.list.d/google-chrome.list"
    sudo sed -i -e 's/deb http/deb [arch=amd64] http/' "/opt/google/chrome/cron/google-chrome"
    
    You changes now won't be overwritten by the config directive.
    Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
    Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.


    #2
    Actually, I just updated Chrome again and I think Google may have fixed the problem now. They have made some changes in the /opt/google/chrome/cron/google-chrome file which look like a fix to me. See below or the attached file for details.

    Code:
    --- google-chrome_new	2016-03-09 17:32:13.889262268 +1300
    +++ google-chrome_old	2016-03-09 17:32:48.457025180 +1300
    @@ -21,8 +21,8 @@
     DEFAULTS_FILE="/etc/default/google-chrome"
     
     # sources.list setting for google-chrome updates.
    -REPOCONFIG="deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main"
    -REPOCONFIGREGEX="deb (\[arch=[^]]*\bamd64\b[^]]*\][[:space:]]*)?https?://dl.google.com/linux/chrome/deb/ stable main"
    +REPOCONFIG="deb http://dl.google.com/linux/chrome/deb/ stable main"
    +SSLREPOCONFIG="deb https://dl.google.com/linux/chrome/deb/ stable main"
     
     APT_GET="`which apt-get 2> /dev/null`"
     APT_CONFIG="`which apt-config 2> /dev/null`"
    @@ -111,7 +111,7 @@
       ACTIVECONFIGS=$(grep -v "^[[:space:]]*\(#.*\)\?$" "$SOURCELIST" 2>/dev/null)
     
       # Check if the correct repository configuration is in there.
    -  REPOMATCH=$(grep -E "^[[:space:]#]*\b$REPOCONFIGREGEX\b" "$SOURCELIST" \
    +  REPOMATCH=$(grep -E "^[[:space:]#]*\b($REPOCONFIG|$SSLREPOCONFIG)\b" "$SOURCELIST" \
         2>/dev/null)
     
       # Check if the correct repository is disabled.
    @@ -198,9 +198,9 @@
       find_apt_sources
       SOURCELIST="$APT_SOURCESDIR/google-chrome.list"
       if [ -r "$SOURCELIST" ]; then
    -    REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*$REPOCONFIGREGEX[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
    +    REPOLINE=$(grep -E "^[[:space:]]*#[[:space:]]*($REPOCONFIG|$SSLREPOCONFIG)[[:space:]]*# disabled on upgrade to .*" "$SOURCELIST")
         if [ $? -eq 0 ]; then
    -      sed -i -e "s,^[[:space:]]*#[[:space:]]*\(.*\)[[:space:]]*# disabled on upgrade to .*,\1," \
    +      sed -i -e "s,^[[:space:]]*#[[:space:]]*\($REPOCONFIG\|$SSLREPOCONFIG\)[[:space:]]*# disabled on upgrade to .*,\1," \
             "$SOURCELIST"
           LOGGER=$(which logger 2> /dev/null)
           if [ "$LOGGER" ]; then
    Attached Files
    Last edited by Rod J; Mar 08, 2016, 10:57 PM.
    Desktop PC: Intel Core-i5-4670 3.40Ghz, 16Gb Crucial ram, Asus H97-Plus MB, 128Gb Crucial SSD + 2Tb Seagate Barracuda 7200.14 HDD running Kubuntu 18.04 LTS and Kubuntu 14.04 LTS (on SSD).
    Laptop: HP EliteBook 8460p Core-i5-2540M, 4Gb ram, Transcend 120Gb SSD, currently running Deepin 15.8 and Manjaro KDE 18.

    Comment


      #3
      Yes I noticed that. I also tried the easy fix but it didn't take. I think they fixed something because update through Muon worked this AM. Also see a green check mark by the little notification icon so maybe somebody fixed that too.

      Comment


        #4
        1. Open a new Terminal window and run the following command (assuming you’re on the Stable Channel, if not, see the featured comment):

        Code:
        sudo gedit /etc/apt/sources.list.d/google-chrome.list
        2. In the text file that opens edit the file so that the line reads:

        Code:
        deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
        The only addition you need to make is entering the [amd64] architecture after ‘deb’ but preceding the ‘http’. Do not edit or replace any other text in this file.


        3. Hit Save. Close the Gedit window.


        Now return to the Terminal and refresh your package list by running:


        Code:
        sudo apt-get update
        The ‘failed to fetch’ APT error should no longer appear.

        Comment

        Working...
        X