gpg: no valid OpenPGP - https://pkg.cloudflare.com/ [FAILED] - package

I am trying to add a repository CloudFlare,through this manual.
curl -C - https://pkg.cloudflare.com/pubkey.gpg | sudo apt-key add -
I am met with the following error:
gpg: no valid OpenPGP data found.
How to fix this problem?

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

Laravel Homestead PHP Warning: PHP Startup: Unable to load dynamic library sqlsrv.so and pdo_sqlsrv.so

I have got to work on a Symfony v4.2, that connects to an external MS SQL Server database. The error I get is:
Attempted to call function "sqlsrv_configure" from the global
namespace.
I know there're already posts about it, but none focused on Laravel Homestead, that runs on Ubuntu 20.04.2.
I am running Homestead v12.3.1, Settler v11.3.0.
So far, I have understood that I should install both the sqlsrv and pdo_sqlsrv extensions.
I have just done that. In this case, given the fact that in Laravel Homestead there are several versions of PHP that you can switch:
$ sudo update-alternatives --config php:
There are 7 choices for the alternative php (providing /usr/bin/php).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/php8.0 80 auto mode
1 /usr/bin/php5.6 56 manual mode
* 2 /usr/bin/php7.0 70 manual mode
3 /usr/bin/php7.1 71 manual mode
4 /usr/bin/php7.2 72 manual mode
5 /usr/bin/php7.3 73 manual mode
6 /usr/bin/php7.4 74 manual mode
7 /usr/bin/php8.0 80 manual mode
As you can see, I am currently using the 7.0 ... it actually can be any.
What I did to install the extensions was to execute the following commands:
$ sudo apt-get install unixodbc-dev Reference
And the following, according to this other reference:
$ sudo pecl install sqlsrv
$ sudo pecl install pdo_sqlsrv
And the output was:
Build process completed successfully
Installing '/usr/lib/php/20200930/sqlsrv.so'
install ok: channel://pecl.php.net/sqlsrv-5.9.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=sqlsrv.so" to php.ini
Build process completed successfully
Installing '/usr/lib/php/20200930/pdo_sqlsrv.so'
install ok: channel://pecl.php.net/pdo_sqlsrv-5.9.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=pdo_sqlsrv.so" to php.ini
Indeed
$ ls -lah /usr/lib/php/20200930/
Those sqlsrv.ini and pdo_sqlsrv.ini do exist.
But then, when I searched for those recently installed extensions
$ php -m | grep sqlsrv
$ php -m | grep pdo_sqlsrv
the result was empty.
Then I restarted the php-fpm service like so:
$ sudo systemctl restart php7.0-fpm
$ php -m
But I got these warnings:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/sqlsrv.so' - /usr/lib/php/20200930/sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
Then I changed directory to
$ cd /etc/php/7.0/mods-available
and $ ls -lah
and edited both the
sqlsrv.ini
; priority=20
extension=/usr/lib/php/20200930/sqlsrv.so
pdo_sqlsrv.ini
; priority=30
extension=/usr/lib/php/20200930/pdo_sqlsrv.so
files.
And I get the same error.
Moreover, even if I change the files to:
sqlsrv.ini
; priority=20
extension=sqlsrv.so
pdo_sqlsrv.ini
; priority=30
extension=pdo_sqlsrv.so
Now I get an slightly different error in the directory:
$ php -m
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_sqlsrv.so' - /usr/lib/php/20151012/pdo_sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/sqlsrv.so' - /usr/lib/php/20151012/sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/pdo_sqlsrv.so' - /usr/lib/php/20151012/pdo_sqlsrv.so: cannot open shared object file: No such file or directory in Unknown on line 0
It looks like it simply can't load the libraries :(
According to this answer
$ find / -name 'sqlsrv' 2>&1 | grep -v 'Permission denied'
returns ( command reference ):
/usr/share/php/docs/sqlsrv
/var/lib/php/modules/7.1/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.1/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.4/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.3/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.0/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/5.6/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/7.2/phpdbg/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/cli/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/cgi/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/fpm/enabled_by_admin/sqlsrv
/var/lib/php/modules/8.0/phpdbg/enabled_by_admin/sqlsrv
$ find / -name 'sqlsrv.so' 2>&1 | grep -v 'Permission denied'
/usr/lib/php/20200930/sqlsrv.so
$ find / -name 'pdo_sqlsrv.so' 2>&1 | grep -v 'Permission denied'
/usr/lib/php/20200930/pdo_sqlsrv.so
Another try I did was according to yet this another answer, where I executed:
$ pear config-set php_ini /etc/php/7.0/fpm/php.ini
And I got:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/sqlsrv.so' - /usr/lib/php/20200930/sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20200930/pdo_sqlsrv.so' - /usr/lib/php/20200930/pdo_sqlsrv.so: undefined symbol: zval_ptr_dtor in Unknown on line 0
config-set succeeded
But I still get the same warnings.
Here's a small explanation, and there but I don't get it :(
What else do I have to do to make PHP load those both sqlsrv.so and pdo_slqsrv.so extensions here on Laravel Homestead?
Are there any other alternatives where I can use a Symfony 4.2 app with the sqlsrv extension enabled? Maybe a virtual machine? Any ideas? Can anyone shed some good light to have this Symfony 4.2 app up and running and being able to connect with a 2017 MS SQL Server?

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

Not able to get sudo update on Ubuntu

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.

Cannot Containerize The Sample App In Google Kubernetes Tutorial

I can't containerize the sample application provided by Google, which means it's either a global issue or something really obvious I'm overlooking.
So. I'm working from the Google PHP Bookshelf Tutorial at https://cloud.google.com/php/tutorials/bookshelf-on-kubernetes-engine with the default Dockerfile, which is to say:
FROM gcr.io/google_appengine/php
# Add our NGINX and php.ini config
ENV DOCUMENT_ROOT=${APP_DIR}/web
# Workaround for AUFS-related permission issue:
# See https://github.com/docker/docker/issues/783#issuecomment-56013588
RUN cp -R ${APP_DIR} ${APP_DIR}-copy; rm -r ${APP_DIR}; mv ${APP_DIR}-copy ${APP_DIR}; chmod -R 550 ${APP_DIR}; chown -R root.www-data ${APP_DIR}
And when I run this command in the directory:
docker build -t gcr.io/{ID}/bookshelf .
I get the following error message that bombs out:
Get:19 http://packages.cloud.google.com/apt gcp-php-runtime-xenial-20181210-1/main amd64 gcp-php72-stackdriver-debugger amd64 0.2.0-7.2.13-1 [16.3 kB]
Fetched 13.1 MB in 3s (3762 kB/s)
W: http://packages.cloud.google.com/apt/pool/gcp-php72-cassandra_1.3.2-7.2.13-1_amd64_ada32d7a11b6c82aaa6b1ac862ef703f9b7fe1c16f640b695465a64457cd4aa4.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf)
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-apcu_5.1.15-7.2.13-1_amd64_15fbd2c2e40acf5c27e025da6a2a91bae6c5d91474e2bc1d6701a38e1694b141.deb 400 Bad Request
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-apcu-bc_1.0.4-7.2.13-1_amd64_2df44251c7d74210da6f81d5008759ae05c6a7508bd867641c3e2a5d09c37023.deb 405 Method Not Allowed
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-cassandra_1.3.2-7.2.13-1_amd64_ada32d7a11b6c82aaa6b1ac862ef703f9b7fe1c16f640b695465a64457cd4aa4.deb Hash Sum mismatch
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-ev_1.0.4-7.2.13-1_amd64_7070488b0e864419786e936ecb37a1db16b8da2ffe7bb6d477de6efd17fb6033.deb Hash Sum mismatch
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-event_2.4.3-7.2.13-1_amd64_43ac00ba31d1d0ef2fb882ea1ea8e7734153e764a083547b4670febde058ec18.deb Hash Sum mismatch
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-grpc_1.17.0-7.2.13-1_amd64_bdd2d379362ab3f30d1360059d73d216ba14e1602ee0e4dd57981da14a7fb08f.deb Hash Sum mismatch
E: Failed to fetch http://packages.cloud.google.com/apt/pool/gcp-php72-imagick_3.4.3-7.2.13-1_amd64_5ade1cea82cf4ac52e7c999e5a93239f12fba76ecf9865a7ad7e9f0fdbd142bd.deb Writing more data than expected (91276 > 85662)
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c /build-scripts/composer.sh' returned a non-zero code: 100
This error occurs whenever I try to run the build anywhere - even if I do a test on my local machine, it still bombs.
What gives?
The apt errors Hash Sum mismatch, 400 Bad Request, 405 Method Not Allowed, Writing more data than expected (91276 > 85662) suggest that something was wrong with the apt package repos at that time.
So I am assuming something was broken with the repo at that time (OR a partial response was received due to a blip in networking which might have caused APT to express these errors).
I have now built the Dockerfile of this tutorial successfully. So I think this was a transient issue.

Resources