在debian strech中添加ppa时,未发现S.gpg-agent.browser错误

时间:2017-07-04 15:11:29

标签: linux debian gnupg gpg-agent

我正在使用debian strech。我尝试使用python支持为vim添加repostory,同时添加我遇到gpg-agent.browser未找到错误

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 个答案:

答案 0 :(得分:0)

这就是我的工作方式:

  1. 查找 S.gpg-agent.browser 文件,它位于/root下 我的系统
  2. 以root身份登录(即su)。更新:没有必要,只需执行sudo下的最后一项,它不会更改当前目录
  3. cd to /root
  4. 执行add-apt-repository ppa:pi-rho/devsudo add-apt-repository ppa:pi-rho/dev
  5. 如果执行失败的方式相同 - 再次执行add-apt-repository ppa:pi-rho/dev

    重点是从查找此文件的目录中执行脚本。这是一个gpg-agent的套接字文件,代理由gpg自动启动,但有时需要一些时间才能启动,所以你需要执行两次。

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