Не удалось получить обновление sudo на Ubuntu

У меня проблема с моим сервером Ubuntu 18.04.

Когда я пытаюсь запустить "sudo apt-get update", я получаю следующее (код 1)

Также я получаю эту ошибку (код 2), когда пытаюсь запустить некоторые службы для мастодонта (joinmastodon.org)

КОД 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.

КОД 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

КОД 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)

КОД 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

Я думаю, что это проблема с сетью, но я не знаю, как ее исправить. Заранее спасибо.


person Community    schedule 27.01.2019    source источник


Ответы (2)


проблема "apt-get update" в КОДЕ 1 заключается в том, что вы пропустили открытый ключ 23E7166788B63E1E. Вы можете добавить этот ключ в свою связку ключей, выполнив:

sudo apt-key adv --recv-key 23E7166788B63E1E

Это покажет вам что-то вроде:

Executing: /tmp/apt-key-gpghome.6KxIWRrerk/gpg.1.sh --recv-key 23E7166788B63E1E
gpg: key 1646B01B86E50310: public key "Yarn Packaging <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Теперь вы можете запустить "apt-get update" или "apt update", и он получит индекс https://dl.yarnpkg.com/debian/dists/stable/InRelease.

person Pixelschleuder    schedule 25.02.2019

Чтобы добавить последний ключ для пряжи

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
person abuzze    schedule 27.01.2020