在Ubuntu 16.10中添加存储库时出错(keyserver接收失败)

每当我尝试在我的Ubuntu 16.10中添加一个存储库时,我都会收到keyserver接收失败的错误。
例如,在添加pycharm repo时,我收到此错误:

sudo add-apt-repository ppa:mystic-mirage/pycharm The Most Intelligent Python IDE Enjoy productive Python, Django, and Web development with PyCharm, an intelligent Python IDE offering unique coding experience This PPA contains both PyCharm Professional and Community Editions Update 2016-07-22: Unity Menubar Integration enabled. Enjoy! More info: https://launchpad.net/~mystic-mirage/+archive/ubuntu/pycharm Press [ENTER] to continue or ctrl-c to cancel adding it gpg: keybox '/tmp/tmppoqic2l4/pubring.gpg' created gpg: keyserver receive failed: No keyserver available 

我刚试过那个存储库,它对我有用。 我不知道你的系统缺少什么,所以试试其中一些。

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D975C4791E7EE5E 5A9BF3BB4E5E17B5 7FB8BEE0A1F196A8 sudo apt-get update sudo add-apt-repository ppa:mystic-mirage/pycharm 

如果这不起作用,请尝试进入系统设置,单击软件和更新,然后在“Ubuntu软件”下,勾选前4个选项中的每一个。 在“其他软件”下,选中“Canonical Partners”,然后再次尝试。

如果仍然无效,请尝试添加:

 deb http://ppa.launchpad.net/mystic-mirage/pycharm/ubuntu yakkety main deb-src http://ppa.launchpad.net/mystic-mirage/pycharm/ubuntu yakkety main 

(也可以从“软件和更新” – >“其他软件”中添加。

试试那些,看看是否有效。