【问题标题】:FileNotFoundError: add-apt-repository ppa:certbot/certbotFileNotFoundError: add-apt-repository ppa:certbot/certbot
【发布时间】:2017-09-04 15:13:43
【问题描述】:

我正在尝试在我的 Ubuntu 16.04 上安装 certbot 以获取 letencrypt 证书。 添加存储库出错。有人可以帮忙吗?提前致谢!

wordpress@MV-WP02:~$ sudo add-apt-repository ppa:certbot/certbot 回溯(最近一次通话最后): 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 335 行,在 get_ppa_info ret = get_ppa_info_from_lp(用户,ppa) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 92 行,在 get_ppa_info_from_lp 返回 get_info_from_lp(lp_url) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 88 行,在 get_info_from_lp 返回 _get_https_content_py3(lp_url) _get_https_content_py3 中的文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 110 行 lp_page = urllib.request.urlopen(请求,cafile=LAUNCHPAD_PPA_CERT) 文件“/usr/lib/python3.5/urllib/request.py”,第 153 行,在 urlopen 卡帕特=卡帕特) 文件“/usr/lib/python3.5/ssl.py”,第 470 行,在 create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] 没有这样的文件或目录 在处理上述异常的过程中,又出现了一个异常: 回溯(最近一次通话最后): 文件“/usr/bin/add-apt-repository”,第 122 行,在 快捷方式=快捷方式处理程序(行) 文件“/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py”,第 841 行,位于shortcut_handler ret = 工厂(快捷方式) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 407 行,在快捷方式处理程序中 返回 PPAShortcutHandler(快捷方式) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 364 行,在 __init__ info = get_ppa_info(self.shortcut) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 347 行,在 get_ppa_info _get_suggested_ppa_message(用户,ppa)) _get_suggested_ppa_message 中的文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 304 行 lp_user = get_info_from_lp(LAUNCHPAD_USER_API % 用户) 文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 88 行,在 get_info_from_lp 返回 _get_https_content_py3(lp_url) _get_https_content_py3 中的文件“/usr/lib/python3/dist-packages/softwareproperties/ppa.py”,第 110 行 lp_page = urllib.request.urlopen(请求,cafile=LAUNCHPAD_PPA_CERT) 文件“/usr/lib/python3.5/urllib/request.py”,第 153 行,在 urlopen 卡帕特=卡帕特) 文件“/usr/lib/python3.5/ssl.py”,第 470 行,在 create_default_context context.load_verify_locations(cafile, capath, cadata) FileNotFoundError: [Errno 2] 没有这样的文件或目录

【问题讨论】:

    标签: ubuntu lets-encrypt certbot


    【解决方案1】:

    我有同样的错误,谷歌搜索让我找到this page,作者说要这样做

    # apt-get install --reinstall ca-certificates
    

    # update-ca-certificates
    

    这为我解决了错误。 查看受影响的软件包,这可能是 SSL 加密的问题,因为这也修复了 apt 不想更新也在 https 地址上的 Docker 存储库的问题。

    【讨论】:

      猜你喜欢
      • 2020-07-23
      • 2017-07-12
      • 1970-01-01
      • 1970-01-01
      • 2014-12-10
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多