Score:0

I think I have horribly destroyed my Packages and am unable to install google chrome on 20.04 Server

cn flag

Disclaimer- I'm new to Linux. I'm running as Raspberry Pi 2GB version with Ubuntu 20.04 server. I may have to factory reset this Pi but I'd like to try and avoid it as I am accessing it remotely via ssh on a windows CMD prompt and instructing family to do the initial setup would be a pain so that I can access it and get it running would be a pain.

I partially solved my own issue, but then have other issues. Have left all of what I've written for context. Skip to the bold bit at the bottom.

I'm trying to run a Python file I've written. Currently when I run it I get the error:

ValueError: Could not get version for Chrome with this command: google-chrome --version || google-chrome-stable --version

Okay, no worries. I just need to get google-chrome. I follow instructions here:

And I get this:

ubuntu@ubuntu:~$ sudo apt-get install libxss1 libappindicator1 libindicator7
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libxss1
E: Unable to locate package libappindicator1
E: Unable to locate package libindicator7

Oh dear.

I've been having some issues getting chrome to install and was digging around in packages and /etc/apt/ trying to sort out errors & duplicates of some sort.

If I do nano sources.list I see that the file is empty. I have a feeling it's not supposed to be empty.

sources.list.d has 1 file, google.list.

If I do apt-get update, I get the result:

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target CNF (main/cnf/Commands-arm64) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target CNF (main/cnf/Commands-arm64) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google.list:2 and /etc/apt/sources.list.d/google.list:3

From what I understand this just means I've run the command twice or something. I comment out line 2 and run sudo apt-get update again, which gives

Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done

But then I can run 'sudo apt-get update' again and I get exactly the same. Shouldn't it kinda tick chrome off the list and not keep trying to update it every time?

My instinct after all this is telling me that I've borked something to do with apt. I don't quite understand what or how but I fully accept the blame, whatever it is I did.

Important bit starts here

So I looked at How do I restore the default repositories? and used the final answer to restore the sources.list file.

I then do 'sudo apt-get update', which gets 53 packages.

If I then run it again, it gets 6 packages. I can keep running the same command and it keeps giving me these same 6 packages, as if they aren't getting installed. The output is:

Hit:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:2 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done

I still face my original issue from way up the top of google chrome not being installed. Any way to work out why these packages won't actually install?

If I go through the process to install google chrome again, I get this:

ubuntu@ubuntu:~$ wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
OK
ubuntu@ubuntu:~$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
ubuntu@ubuntu:~$ sudo apt update
Hit:1 https://packages.microsoft.com/ubuntu/20.04/mssql-server-2019 focal InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target CNF (main/cnf/Commands-arm64) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target CNF (main/cnf/Commands-arm64) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
W: Target CNF (main/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list.d/google.list:3 and /etc/apt/sources.list.d/google.list:4
ubuntu@ubuntu:~$ sudo apt install google-chrome-stable
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package google-chrome-stable
Nmath avatar
ng flag
Edit your question with the output of `cat /etc/apt/sources.list`. You should also be clear with what you did when you "horribly destroyed" your packages. You've started in the middle of your problems. Back up and give us more context. Are you aware that you should run `sudo apt update` before any other commands in `apt` and that it's generally a good idea to also upgrade packages with `sudo apt upgrade` before adding new software? If your problem is very convoluted, it's a better path to flash a clean install and start over.
F1rools22 avatar
cn flag
Output of cat /etc/apt/sources.list was a bit long, so I put it in a pastebin: https://pastebin.com/FA21HxaT. I've tried to give as much context as I can to what I've done to my poor packages, I'm not sure what other context I can give.
F1rools22 avatar
cn flag
@OrganicMarble I did that (And said so in my question)
F1rools22 avatar
cn flag
@OrganicMarble Sorry, can you specify which lines? I'm looking at it and can't see which are dupes.
F1rools22 avatar
cn flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/127649/discussion-between-f1rools22-and-organic-marble).
Score:1
cn flag

"But then I can run 'sudo apt-get update' again and I get exactly the same. Shouldn't it kinda tick chrome off the list and not keep trying to update it every time?"

No, of course not. Every time you run sudo apt update, you are telling the system to check ALL sources for their lists of all available packages. Checking only a few sources is pointless; some sources update several times each day.

Updating is harmless and quick. Let the system update the way it's supposed to.

"I then do 'sudo apt-get update', which gets 53 packages."

No, it doesn't. Running update gets only updates your local database of packages that are available for download. It doesn't download any actual packages. Running upgrade will download the actual 53 packages.

"I still face my original issue from way up the top of google chrome not being installed. Any way to work out why these packages won't actually install?"

Stop. Your output is from update, not from upgrade. You're not telling the system to install anything. Your output is completely normal.

"If I go through the process to install google chrome again, I get this:"

STOP running the same install instructions over and over and re-adding Google sources to apt. Each time you do that, you need to go back and remove the duplicate you added to your sources. (You already know how to do that).

Maybe you have a problem installing Chrome. Maybe you don't. You have several other misunderstandings about how apt works (and mistakes to correct) before you are ready to install Chrome. Apt is super-easy to learn and super-easy to use properly. But it DOES need to be learned, so take a few minutes and do that first.

Score:0
cn flag

Solved this:

The RaspPi 4B runs arm64, but the default for chrome in /etc/apt/sources.list.d/google.list is [arch=amd64]. Chrome stable doesn't support arm64.

Relevant post: Can not install chrome browser in ubuntu 20.04 on Raspberry pi 4 8Gb

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.