首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在Ubuntu上获取sudo更新

无法在Ubuntu上获取sudo更新
EN

Stack Overflow用户
提问于 2019-01-28 01:00:33
回答 2查看 595关注 0票数 1

我的18.04 Ubuntu服务器有问题。

当我尝试运行"sudo apt-get update“时,我得到了这个(代码1)

当我尝试为乳齿象(joinmastodon.org)启动一些服务时,我也得到了这个错误(代码2)

代码1

代码语言:javascript
复制
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

代码语言:javascript
复制
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

代码语言:javascript
复制
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

代码语言:javascript
复制
mastodon@dedi-par-72088:~$ systemctl enable mastodon-*
Failed to enable unit: The name org.freedesktop.PolicyKit1 was not provided by any .service files

我认为这是一个网络问题,但我不知道如何解决它。提前谢谢你。

EN

回答 2

Stack Overflow用户

发布于 2020-01-27 15:24:28

为纱线运行添加最新的关键点

代码语言:javascript
复制
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
票数 1
EN

Stack Overflow用户

发布于 2019-02-26 00:23:43

代码1中"apt-get update“的问题是,您被误认为是公钥23E7166788B63E1E。您可以通过执行以下命令将此密钥添加到您的密钥环中:

代码语言:javascript
复制
sudo apt-key adv --recv-key 23E7166788B63E1E

它将向您显示类似以下内容:

代码语言:javascript
复制
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

现在您可以运行"apt-get update“或"apt update",它也会获取https://dl.yarnpkg.com/debian/dists/stable/InRelease的索引。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54390598

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档