我正在使用 Deepin Linux 15.4.1,当我尝试使用以下命令添加 snappy-dev/tools 存储库时,我想安装 snapcraft 包(为此,我需要“标题的存储库”):
sudo add-apt-repository ppa:snappy-dev/tools
但我收到错误:
Official PPA for the Snappy related tools.
More info: https://launchpad.net/~snappy-dev/+archive/ubuntu/tools
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keybox '/tmp/tmp4dbu3qkt/pubring.gpg' created
gpg: /tmp/tmp4dbu3qkt/trustdb.gpg: trustdb created
gpg: key F1831DDAFC42E99D: public key "Launchpad PPA for Snappy Developers" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
当我第二次尝试添加存储库时,我得到:
Snappy 相关工具的官方 PPA。更多信息:https://launchpad.net/~snappy-dev/+archive/ubuntu/tools 按 [ENTER] 继续或按 ctrl-c 取消添加
gpg: keybox '/tmp/tmphwxyr_qo/pubring.gpg' created
gpg: /tmp/tmphwxyr_qo/trustdb.gpg: trustdb created
gpg: key F1831DDAFC42E99D: public key "Launchpad PPA for Snappy Developers" imported
gpg: Total number processed: 1
gpg: imported: 1
gpg: no valid OpenPGP data found.
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 688, in addkey_func
func(**kwargs)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 386, in add_key
return apsk.add_ppa_signing_key()
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 273, in add_ppa_signing_key
cleanup(tmp_keyring_dir)
File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 234, in cleanup
shutil.rmtree(tmp_keyring_dir)
File "/usr/lib/python3.5/shutil.py", line 480, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/usr/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
os.unlink(name, dir_fd=topfd)
FileNotFoundError: [Errno 2] Arquivo ou diretório não encontrado: 'S.gpg-agent.extra'
我在论坛上阅读了很多有关此内容的建议,但没有找到任何与我的错误相同的帖子。我尝试添加与 snap 相关的其他存储库,但遇到了与本文中所述相同的错误;我该如何解决这个问题?
答案1
这从评论中回答:
snap install --candidate --classic snapcraft