昨天刚刚安装了 Linux Mint 18.2 Cinnamon,现在正在尝试安装 Wine,但我所做的一切都会导致同样的错误。不知何故,我的代号一定与 Linux Mint Cinnamon 不匹配,并且不知道如何解决这个问题或如何安装 Wine。在内核 4.14.1-041401-generic 上运行。任何帮助都会很棒!谢谢!
sudo add-apt-repository ppa:wine/wine-builds
LSB codename: 'Traceback (most recent call last):
File "/usr/bin/lsb_release", line 95, in <module>
main()
File "/usr/bin/lsb_release", line 59, in main
distinfo = lsb_release.get_distro_information()
File "/usr/lib/python3/dist-packages/lsb_release.py", line 383, in get_distro_information
distinfo = guess_debian_release()
File "/usr/lib/python3/dist-packages/lsb_release.py", line 281, in guess_debian_release
get_distro_info(distinfo['ID'])
File "/usr/lib/python3/dist-packages/lsb_release.py", line 41, in get_distro_info
RELEASES_ORDER.sort(key=lambda n: float(n[0]))
File "/usr/lib/python3/dist-packages/lsb_release.py", line 41, in <lambda>
RELEASES_ORDER.sort(key=lambda n: float(n[0]))
ValueError: could not convert string to float: '14.04 LTS''.
Version of base-files: '18.2.1'.
Your LSB codename isn't a valid Linux Mint codename.
答案1
看来已经/etc/lsb-release
从 Mint 版本更换为 Ubuntu 版本了。
有时这样做是为了让为 Ubuntu 设计的软件能够在 Mint 上运行。
选项 1:恢复/etc/lsb-release
到原始版本:
# Download the base-files package into /tmp
cd /tmp
apt download base-files
# Extract the lsb-release from the DEB
dpkg --fsys-tarfile base-files_*_all.deb | tar xO ./etc/lsb-release > /tmp/lsb-release-mint
# Overwrite the existing /etc/lsb-release if filesize > 0
[ -s /tmp/lsb-release-mint ] && sudo mv /tmp/lsb-release-mint /etc/lsb-release
选项 2:在以下位置创建符号链接/usr/share/mintsources
:
MINT_CODENAME=$(grep -oP 'CODENAME=\K\w+' /etc/linuxmint/info)
UBUNTU_CODENAME=$(lsb_release -sc)
sudo ln -rs /usr/share/mintsources/$MINT_CODENAME /usr/share/mintsources/$UBUNTU_CODENAME
注意:如果您升级操作系统,您可能需要更新此符号链接。