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