添加存储库以在ubuntu

时间:2017-11-20 18:28:23

标签: python ubuntu-16.04 atom-editor

我正在尝试安装Atom以便能够开发我的网站,但是在我尝试添加存储库时,这有一些冲突。将显示以下输出:

    marcius@Marcius-PC:~$ sudo add-apt-repository ppa:webupd8team/atom
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)
ssl.SSLError: unknown error (_ssl.c:3053)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 122, in <module>
    shortcut = shortcut_handler(line)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 864, 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)
ssl.SSLError: unknown error (_ssl.c:3053)
marcius@Marcius-PC:~$ 

在我看来,python的依赖性存在一些问题,有人确切地知道它是什么,以及更好的如何纠正?

1 个答案:

答案 0 :(得分:2)

删除/usr/share/ca-certificates中的所有证书,然后重新安装为我工作。

试试这个:

sudo rm -rf /usr/share/ca-certificates

sudo apt-get --reinstall install ca-certificates

来源:https://ubuntuforums.org/showthread.php?t=2113326