简体   繁体   English

FileNotFoundError:add-apt-repository ppa:certbot / certbot

[英]FileNotFoundError: add-apt-repository ppa:certbot/certbot

I'm trying to install certbot on my Ubuntu 16.04 for letsencrypt certificates. 我正在尝试在我的Ubuntu 16.04上安装certbot以获取letencrypt证书。 Adding the repository goes wrong. 添加存储库出错。 Can somebody help? 有人可以帮忙吗? Thanks in advance! 提前致谢!

wordpress@MV-WP02:~$ sudo add-apt-repository ppa:certbot/certbot

    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 335, in get_ppa_info
        ret = get_ppa_info_from_lp(user, ppa)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 92, in get_ppa_info_from_lp
        return get_info_from_lp(lp_url)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
        return _get_https_content_py3(lp_url)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in _get_https_content_py3
        lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
      File "/usr/lib/python3.5/urllib/request.py", line 153, in urlopen
        capath=capath)
      File "/usr/lib/python3.5/ssl.py", line 470, in create_default_context
        context.load_verify_locations(cafile, capath, cadata)
    FileNotFoundError: [Errno 2] No such file or directory

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/usr/bin/add-apt-repository", line 122, in 
        shortcut = shortcut_handler(line)
      File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 841, in shortcut_handler
        ret = factory(shortcut)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 407, in shortcut_handler
        return PPAShortcutHandler(shortcut)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 364, in __init__
        info = get_ppa_info(self.shortcut)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 347, in get_ppa_info
        _get_suggested_ppa_message(user, ppa))
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 304, in _get_suggested_ppa_message
        lp_user = get_info_from_lp(LAUNCHPAD_USER_API % user)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 88, in get_info_from_lp
        return _get_https_content_py3(lp_url)
      File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 110, in _get_https_content_py3
        lp_page = urllib.request.urlopen(request, cafile=LAUNCHPAD_PPA_CERT)
      File "/usr/lib/python3.5/urllib/request.py", line 153, in urlopen
        capath=capath)
      File "/usr/lib/python3.5/ssl.py", line 470, in create_default_context
        context.load_verify_locations(cafile, capath, cadata)
    FileNotFoundError: [Errno 2] No such file or directory

I had the same error, a Google search got me to this page , where the author said to do 我遇到了同样的错误,谷歌搜索将我带到了该页面 ,作者说在那里

# apt-get install --reinstall ca-certificates

and

# update-ca-certificates

which worked out the error for me. 这为我解决了错误。 Looking at the packages that were affected, this may be a problem with SSL-Encryption, since this also fixed apt not wanting to update Docker repositories, which were also on an https address. 查看受影响的软件包,这可能是SSL加密的问题,因为这也解决了不希望更新Docker存储库(也位于https地址)的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ubuntu 14.04尝试“ sudo add-apt-repository ppa:tualatrix / ppa”失败 - Ubuntu 14.04 Try to “sudo add-apt-repository ppa:tualatrix/ppa” failed 删除由 add-apt-repository 添加的存储库 - removeing repository addded by add-apt-repository 通过Chef做add-apt-repository的正确方法是什么? - What is the right way to do add-apt-repository via Chef? 在ubuntu上进行Sublime安装(add-apt-repository错误) - Sublime installation on ubuntu (add-apt-repository error) add-apt-repository查找源代码的“ jessy”而不是“ trusty”版本 - add-apt-repository looks for 'jessy' instead of 'trusty' version of the source 首先运行所有“add-apt-repository”命令,然后运行一个“apt-get update” - Run all 'add-apt-repository' commands first, then run a single 'apt-get update' 为旧的 ubuntu 版本 (14) 和 php 7.0 添加-apt-repository ondrej/php - add-apt-repository ondrej/php for old ubuntu versions (14) and php 7.0 Docker 容器与 ubuntu 16.04 add-apt-repository 使用 groovy 而不是 xenial - Docker container with ubuntu 16.04 add-apt-repository using groovy instead of xenial 如何将certbot添加到另一个端口 - How to add certbot to another port 在 ubuntu 中添加此存储库时 sudo apt-add-repository ppa:brightbox/ruby-ng 错误 - while adding this repo in ubuntu sudo apt-add-repository ppa:brightbox/ruby-ng error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM