Saturday, March 26, 2016

Bash one-liner to fix "Failed to fetch" error for chrome in ubuntu

See this page for details on how an why, but here's the error:

W: Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release:
    Unable to find expected entry 'main/binary-i386/Packages'
    in Release file (Wrong sources.list entry or malformed file)

And this will fix it in one shot:

sudo sed -i 's?deb http://dl.google.com/linux/chrome/deb/ stable main?deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main?g' /etc/apt/sources.list.d/google-chrome.list

No comments :