在Ubuntu 18.04上安装sbt时出错:gpg:密钥服务器接收失败:参数无效 [英] Error installing sbt on Ubuntu 18.04: `gpg: keyserver receive failed: Invalid argument`
问题描述
我正在关注官方sbt安装说明。
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
Executing: /tmp/apt-key-gpghome.uRI0yiusG0/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
gpg: keyserver receive failed: Invalid argument
编辑:
我尝试挖掘执行的gpg.1.sh脚本。这是对gpg的最终调用。
I've tried digging into the gpg.1.sh script that it executes. Here is the final call to gpg.
$ sudo cat /tmp/apt-key-gpghome.IRnmlx6hfX/gpg.0.sh
#!/bin/sh
exec 'gpg' --ignore-time-conflict --no-options --no-default-keyring \
--homedir '/tmp/apt-key-gpghome.IRnmlx6hfX' --no-auto-check-trustdb --trust-model always "$@"
编辑2:
我试图直接从密钥服务器中查询密钥,但是没有运气。参见 http://keyserver.ubuntu.com/pks/lookup?search = 2EE0EA64E40A89B84B2DF73499E82A75642AC823& op = vindex 。
I've tried to directly query for the key from the keyserver with no luck. See http://keyserver.ubuntu.com/pks/lookup?search=2EE0EA64E40A89B84B2DF73499E82A75642AC823&op=vindex . Is it possible the key is missing?
编辑3:
我在2月24日再次尝试,现在
I retried again on Feb 24th and it now works!
推荐答案
给出命令
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
我遇到了错误
Executing: /tmp/apt-key-gpghome.DKOlZn67Q0/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
gpg: ricezione dal server di chiavi non riuscita: Dati assenti
(无数据)
我以这种方式解决了(Ubuntu 18.04.1笔记本电脑,在公司后面代理,无需身份验证):
I solved in this way (laptop with Ubuntu 18.04.1, behind a corporate proxy without authentication):
- 使用gpg获取密钥:
gpg --receive-keys 99E82A75642AC823
- gpg告诉我该密钥属于scalasbt@gmail.com
- 在 http://keyserver.ubuntu.com/ 使用电子邮件地址
- 将密钥保存在本地文件中(sbt -key),然后使用
sudo apt-key导入并添加sbt-key
- got the key with gpg:
gpg --receive-keys 99E82A75642AC823
- gpg showed me that the key belongs to scalasbt@gmail.com
- searched that key on http://keyserver.ubuntu.com/ using the email address
- saved the key in local file (sbt-key) and then imported with
sudo apt-key add sbt-key
这篇关于在Ubuntu 18.04上安装sbt时出错:gpg:密钥服务器接收失败:参数无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!