3

After installing Kubuntu 18.04 on a Thinkpad W520 on btrfs over LUKS I came to the activation of the automatic APT snapshots. Here it shows up that any call of apt-btrfs-snapshot crashes, complaining the missing module 'distutils.spawn'. Here an example with the list action:

# sudo apt-btrfs-snapshot list
Traceback (most recent call last):
  File "/usr/bin/apt-btrfs-snapshot", line 33, in <module>
    from apt_btrfs_snapshot import AptBtrfsSnapshot
  File "/usr/lib/python3/dist-packages/apt_btrfs_snapshot.py", line 28, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils.spawn'

Every call of apt-btrfs-snapshot brings the same traceback message, including the APT functions, whith their internal call.

Reinstalling apt-btrfs-snapshot brougth no improvement.

My Python is:

python --version
Python 2.7.15rc1

How can I repair apt-btrfs-snapshot ?

I choosed here not to upgrade my old Ubuntu 16.04:

I did a new install on another disk, hoping to get a cleaner KDE install.

I must probably also report the bug.

Against the lack of an automated, forced snapshotting on updates, I am helping myself by running my own backup utility mylinuxsync before and after all updates. So I create snapshots before/after, both locally and on my backup raid on the desktop.

prometheos
  • 311
  • 1
  • 3
  • 11
  • I am rehearsing for a complete Kubuntu install on a new Thinkpad P51 for my son - I am already two months too late for his 30th birthday! – prometheos Jun 21 '18 at 18:38

1 Answers1

3

I succeeded with the answer by @John to the question The program Anki won't start, with the simple suggestion to install python3-distutils

sudo apt-get install python3-distutils

I must_withdraw_my old answer below, as I could not reproduce it a couple of times:

(The problem disappeared for me after I added the LC_ALL line to the file /etc/default/locale:

LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8

That one line was somehow missing. )

prometheos
  • 311
  • 1
  • 3
  • 11
  • This came as a side effect while trying to cure this locale problem, occouring e.g.:update-initramfs -u -k all # errormessage="perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US"..., " – prometheos Jun 24 '18 at 11:03
  • I am not an old Ubuntu veteran: my first recent install was Ubuntu 16.04 amd64 on my laptop 2016, and two have added now: Kubuntu 18.04 amd64 now (1x test, 1x production, with God's help...). I would now say, this error is typical of Kubuntu 18.04, if not... Well,the fact that if I ask Ubuntu for the error "No module named 'distutils.spawn'" I get only two questions in return - mine and @Glass Wizard 's. I myself have seen this message with some Perl and some Python programs: it could affect half of the Ubuntu System! But not 16.04. What is the opinion of the High (Carma-) Decorated Experts? – prometheos Jul 28 '18 at 14:20