add-apt-repository 抛出奇怪的错误(18.03)

add-apt-repository 抛出奇怪的错误(18.03)

我按照他们网站上提供的指南尝试启用 wireshark 存储库,然后运行

sudo add-apt-repository ppa:Wireshark-dev/stable

它返回了这些错误。

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 136, in <module>
    shortcut = shortcut_handler(line)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 868, in shortcut_handler
    ret = factory(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 398, in shortcut_handler
    return PPAShortcutHandler(shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 355, in __init__
    info = get_ppa_info(self.shortcut)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 338, in get_ppa_info
    _get_suggested_ppa_message(user, ppa))
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 295, 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 95, in get_info_from_lp
    return get_info_from_https(lp_url, True)
  File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 90, in get_info_from_https
    return json.loads(data)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

我对使用 Linux 还很陌生,不熟悉终端及其一些命令,如果能得到一些帮助我将非常感谢。

编辑:存储库的简单拼写错误,是我的愚蠢错误。

答案1

删除引起问题的存储库。

sudo add-apt-repository --remove ppa:wireshark-dev/stable # w inireshark 区分大小写
sudo apt 更新

从默认的 Ubuntu 存储库安装 wireshark。

sudo apt install wireshark

相关内容