ConfigParser.NoSectionError:セクションなし:リポジトリを追加しようとしたときに「一般」

ConfigParser.NoSectionError:セクションなし:リポジトリを追加しようとしたときに「一般」

しようとすると、sudo add-apt-repository <any>次のエラーが発生します。

Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1387, in <module>
    codename = config_parser.get("general", "base_codename")
  File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
    raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'

この問題をどのように解決できますか?

私が変わったからですかpython? (今です、今です)python3
python --versionPython 3.5.1python2 --versionPython 2.7.6

ベストアンサー1

lsb-releaseファイルを確認してください。 lsb-releaseの内容を変更しましたか? /etc/lsb-releaseにあります。

バージョンに合わせてlsb-releaseの内容を変更してください。このような:

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18
DISTRIB_CODENAME=sarah
DISTRIB_DESCRIPTION="Linux Mint 18 sarah"

おすすめ記事