2

Just installed Linux Mint 18.2 Cinnamon yesterday and am now trying to get Wine installed but everything I do results in this same error. Somehow my codename must not match to Linux Mint Cinnamon and have no idea how to fix this or how to get Wine installed. Running on Kernel 4.14.1-041401-generic. Any help would be great! Thanks!

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 Answer 1

2

It seems that /etc/lsb-release has been replaced from the Mint version to the Ubuntu one.

This is done sometimes as a workaround to get software designed for Ubuntu to work on Mint.

Option 1: Restore /etc/lsb-release to the original version:

# 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

Option 2: Create a symbolic link in /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

Note: You might need to update this symbolic link if you upgrade your OS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .