gpt4 book ai didi

linux - 在 debian stretch 中添加 ppa 时找不到 S.gpg-agent.browser 错误

转载 作者:IT王子 更新时间:2023-10-29 00:24:16 24 4
gpt4 key购买 nike

我正在使用 debian strech。我尝试为支持 python 的 vim 添加存储库,同时添加时遇到 gpg-agent.browser not found 错误

sudo add-apt-repository ppa:pi-rho/dev
[sudo] password for sathish:
Dev Packages
More info: https://launchpad.net/~pi-rho/+archive/ubuntu/dev
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpxl_vk750/pubring.gpg' created
gpg: /tmp/tmpxl_vk750/trustdb.gpg: trustdb created
gpg: key CC892FC6779C27D7: public key "Launchpad PPA for pi-rho" 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] No such file or directory: 'S.gpg-agent.browser'

最佳答案

这对我来说是这样的:

  1. 查找文件 S.gpg-agent.browser,它位于 /root 下我的系统
  2. 以 root 身份登录(即 su)。更新:不需要,只执行sudo下的最后一项,不会改变当前目录
  3. cd 到 /root
  4. 执行 add-apt-repository ppa:pi-rho/devsudo add-apt-repository ppa:pi-rho/dev

如果以同样的方式执行失败 - 再次执行 add-apt-repository ppa:pi-rho/dev

重点是从它查找此文件的目录执行脚本。这是一个gpg-agent的socket文件,agent是由gpg自动启动的,但是有时候启动需要一些时间,所以需要执行两次。

当然,有一个正确的方法可以通过更新一些配置来解决这个问题,但我对 linux 不是很熟悉。

关于linux - 在 debian stretch 中添加 ppa 时找不到 S.gpg-agent.browser 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44909408/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com