Not able to get sudo update on Ubuntu - ubuntu-18.04

I have an issue with my 18.04 Ubuntu Server.
When I try to run "sudo apt-get update" I get this (code 1)
Also I get this error (code 2) when I try to start some services for mastodon (joinmastodon.org)
CODE 1
root#dedi-par-72088:~# sudo apt-get update
Hit:1 http://mirrors.online.net/ubuntu bionic InRelease
Hit:2 http://mirrors.online.net/ubuntu bionic-updates InRelease
Hit:3 http://mirrors.online.net/ubuntu bionic-backports InRelease
Hit:4 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:5 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:7 https://deb.nodesource.com/node_8.x bionic InRelease
Get:8 https://dl.yarnpkg.com/debian stable InRelease [13.3 kB]
Err:8 https://dl.yarnpkg.com/debian stable InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 23E7166788B63E1E
W: Some index files failed to download. They have been ignored, or old ones used instead.
CODE 2
Failed to start mastodon-web.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status mastodon-web.service' for details.
Failed to start mastodon-sidekiq.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status mastodon-sidekiq.service' for details.
Failed to start mastodon-streaming.service: The name org.freedesktop.PolicyKit1 was not provided by any .service files
See system logs and 'systemctl status mastodon-streaming.service' for details
CODE 2.1
mastodon#dedi-par-72088:~$ systemctl status mastodon-streaming.service
● mastodon-streaming.service - mastodon-streaming
Loaded: loaded (/etc/systemd/system/mastodon-streaming.service; disabled; vendor preset: enabl
Active: inactive (dead)
CODE 2.2
mastodon#dedi-par-72088:~$ systemctl enable mastodon-*
Failed to enable unit: The name org.freedesktop.PolicyKit1 was not provided by any .service files
I think this is a Networking issue, but I have no idea how to fix it.
Thank you in advance.

To add the latest key for yarn run
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -

the issue of "apt-get update" in CODE 1 is that you are missung the public key 23E7166788B63E1E.
You can add this key to your keyring through executing:
sudo apt-key adv --recv-key 23E7166788B63E1E
It will show you something like:
Executing: /tmp/apt-key-gpghome.6KxIWRrerk/gpg.1.sh --recv-key 23E7166788B63E1E
gpg: key 1646B01B86E50310: public key "Yarn Packaging <yarn#dan.cx>" imported
gpg: Total number processed: 1
gpg: imported: 1
Now you can run "apt-get update", or "apt update" and it will fetch the index of https://dl.yarnpkg.com/debian/dists/stable/InRelease as well.

For this one
sudo apt-get update
I think I know the answer. First identify the Apps that make problems. Here it seems yarn. Then GO TO /var/etc/apt/sources.list.d and delete the related 2 files to that App in this folder.
Worked well for mine.

Related

Runnning Selenium on Colab is broken again [duplicate]

Few hour ago my setup in google colab for selenium worked fine. Now it stopped working all of a sudden.
This is a sample:
!pip install selenium
!apt-get update
!apt install chromium-chromedriver
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome('chromedriver',
chrome_options=chrome_options)
I get the error:
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1
Any ideas on solving it?
This error message...
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 1
...implies that the chromedriver service unexpectedly exited.
This is because of the of an issue induced as the colab system was updated from v18.04 to ubuntu v20.04 LTS recently.
The main reason is, with Ubuntu v20.04 LTS google-colaboratory no longer distributes chromium-browser outside of a snap package.
Quick Fix
#mco-gh created a new notebook following #metrizable's guidance
(details below) which is working perfect as of now:
https://colab.research.google.com/drive/1cbEvuZOhkouYLda3RqiwtbM-o9hxGLyC
Solution
As a solution you can install a compatible version of chromium-browser from the Debian buster repository using the following code block published by #metrizable in the discussion Issues when trying to use Chromedriver in Colab
%%shell
# Ubuntu no longer distributes chromium-browser outside of snap
#
# Proposed solution: https://askubuntu.com/questions/1204571/how-to-install-chromium-without-snap
# Add debian buster
cat > /etc/apt/sources.list.d/debian.list <<'EOF'
deb [arch=amd64 signed-by=/usr/share/keyrings/debian-buster.gpg] http://deb.debian.org/debian buster main
deb [arch=amd64 signed-by=/usr/share/keyrings/debian-buster-updates.gpg] http://deb.debian.org/debian buster-updates main
deb [arch=amd64 signed-by=/usr/share/keyrings/debian-security-buster.gpg] http://deb.debian.org/debian-security buster/updates main
EOF
# Add keys
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys DCC9EFBF77E11517
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 648ACFD622F3D138
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 112695A0E562B32A
apt-key export 77E11517 | gpg --dearmour -o /usr/share/keyrings/debian-buster.gpg
apt-key export 22F3D138 | gpg --dearmour -o /usr/share/keyrings/debian-buster-updates.gpg
apt-key export E562B32A | gpg --dearmour -o /usr/share/keyrings/debian-security-buster.gpg
# Prefer debian repo for chromium* packages only
# Note the double-blank lines between entries
cat > /etc/apt/preferences.d/chromium.pref << 'EOF'
Package: *
Pin: release a=eoan
Pin-Priority: 500
Package: *
Pin: origin "deb.debian.org"
Pin-Priority: 300
Package: chromium*
Pin: origin "deb.debian.org"
Pin-Priority: 700
EOF
# Install chromium and chromium-driver
apt-get update
apt-get install chromium chromium-driver

ROS2 Dashing cannot be installed because the public key is not available

OS: ubuntu 18.04
Installation: ROS2 Dashing
Installation date: 2021/05/29
Official documentation
"https://docs.ros.org/en/dashing/Installation/Ubuntu-Install-Debians.html"
I tried to install it referring to the official documentation, but I can't get the apt repository because the public key isn't available.
W: GPG error: http://packages.ros.org/ros2/ubuntu bionic InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <info#osrfoundation.org>
E: The repository 'http://packages.ros.org/ros2/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I tried.
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add-
Another article said that doing this would solve it, so I did it, but it still didn't work.
sudo apt-key adv -keyserver keyserver.ubuntu.com -recv-keys F42ED6FBAB17C654
Has there been another change recently?
please Help me.
Just had a similar issue and for me, this fixed it. Basically, I had add the new repository key and delete the old one. Listing the commands here for convenience:
# add new repository key:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
# remove old repository key:
sudo apt-key del 421C365BD9FF1F717815A3895523BAEEB01FA116
Hope this helps you as well!
Update: If it does not, please watch these two:
https://answers.ros.org/question/379190/apt-update-signatures-were-invalid-f42ed6fbab17c654/
https://discourse.ros.org/t/ros-gpg-key-expiration-incident/20669/3

ppa error add-apt-repository ppa:guacamole/stable

i'm getting this error while trying to add the ppa for apache guacamole to my ubuntu server. i was following the guide here. it looks like the InRelease archive is found, but I get an error on the Release archive. Is there a way to work around this? Can I use the InRelease archive and not the Release one? It's obviously easier to install via apt-install, but if I have to do it another way I'm not opposed.
thanks.
$ sudo add-apt-repository ppa:guacamole/stable
The most recent stable release of Guacamole and its components. The packages here use the same packaging as the downstream Debian and Ubuntu packages, but are updated more frequently, usually while the corresponding downstream packages are under official review.
More info: https://launchpad.net/~guacamole/+archive/ubuntu/stable
Press [ENTER] to continue or Ctrl-c to cancel adding it.
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 http://ppa.launchpad.net/guacamole/stable/ubuntu bionic InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic-security InRelease
Err:6 http://ppa.launchpad.net/guacamole/stable/ubuntu bionic Release
404 Not Found [IP: 91.189.95.83 80]
Reading package lists... Done
E: The repository 'http://ppa.launchpad.net/guacamole/stable/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
The ppa is not maintained anymore. The latest package there is from 2013 :/
So, you need to use a tutorial to install it from source.

Unable to resolve 'us.archive.ubuntu.com' when using 'update' command in Ubuntu

When I use the command "sudo apt-get update" I get the following errors:
Err:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Could not resolve 'us.archive.ubuntu.com'
Err:2 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Could not resolve 'us.archive.ubuntu.com'
Err:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Could not resolve 'security.ubuntu.com'
Err:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Could not resolve 'us.archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic /InRelease Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Could not resolve 'us.archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Could not resolve 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Could you please help me to solve it?
check your /etc/resovl.conf & send the result

apache2 installation on linux:Unable to correct problems, you have held broken packages

i'm trying to install Apache on my Linux via terminal. used commands like
"sudo apt-get update && sudo apt-get upgrade"
and
"sudo apt-get install apache2"
i'm getting the error
"Unable to correct problems, you have held broken packages."
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
apache2 : Depends: apache2-bin (= 2.4.18-2ubuntu3.8) but it is not going to be installed
Depends: apache2-utils (>= 2.4)
E: Unable to correct problems, you have held broken packages.

Resources