/var/lib/dpkg/info/dist-base-files.postinst: line 9: /usr/libexec/helper-scripts/user_create.bsh: No such file or directory

Hello Whonix community,

I am trying to upgrade my whonix VMs but I keep encountering the following error: /var/lib/dpkg/info/dist-base-files.postinst: line 9: /usr/libexec/helper-scripts/user_create.bsh: No such file or directory

Here is the full log:

$ sudo apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  deborphan hardened-malloc hexchat hexchat-common iptables libip6tc2 libnetfilter-conntrack3 libnfnetlink0 linux-compiler-gcc-10-x86 linux-headers-5.10.0-33-common
  linux-kbuild-5.10 non-qubes-vm-enhancements-cli non-qubes-vm-enhancements-gui youtube-dl
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-headers-5.10.0-33-amd64 linux-image-5.10.0-33-amd64
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
11 not fully installed or removed.
After this operation, 324 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 150790 files and directories currently installed.)
Removing linux-headers-5.10.0-33-amd64 (5.10.226-1) ...
Removing linux-image-5.10.0-33-amd64 (5.10.226-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-33-amd64
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found theme: /boot/grub/themes/whonix-workstation/theme.txt
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-6.1.0-37-amd64
Found initrd image: /boot/initrd.img-6.1.0-37-amd64
Found linux image: /boot/vmlinuz-6.1.0-27-amd64
Found initrd image: /boot/initrd.img-6.1.0-27-amd64
Found linux image: /boot/vmlinuz-6.1.0-37-amd64
Found initrd image: /boot/initrd.img-6.1.0-37-amd64
Found linux image: /boot/vmlinuz-6.1.0-27-amd64
Found initrd image: /boot/initrd.img-6.1.0-27-amd64
Found linux image: /boot/vmlinuz-6.1.0-37-amd64
Found initrd image: /boot/initrd.img-6.1.0-37-amd64
Found linux image: /boot/vmlinuz-6.1.0-27-amd64
Found initrd image: /boot/initrd.img-6.1.0-27-amd64
Found linux image: /boot/vmlinuz-6.1.0-37-amd64
Found initrd image: /boot/initrd.img-6.1.0-37-amd64
Found linux image: /boot/vmlinuz-6.1.0-27-amd64
Found initrd image: /boot/initrd.img-6.1.0-27-amd64
Found linux image: /boot/vmlinuz-6.1.0-37-amd64
Found initrd image: /boot/initrd.img-6.1.0-37-amd64
Found linux image: /boot/vmlinuz-6.1.0-27-amd64
Found initrd image: /boot/initrd.img-6.1.0-27-amd64
done
Setting up dist-base-files (3:13.8-1) ...
/var/lib/dpkg/info/dist-base-files.postinst: line 9: /usr/libexec/helper-scripts/user_create.bsh: No such file or directory

####################################################################
## BEGIN ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: source /usr/libexec/helper-scripts/user_create.bsh
## EXIT_CODE: 1
##
## END ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
## Please report this bug!
####################################################################

dpkg: error processing package dist-base-files (--configure):
 installed dist-base-files package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of kicksecure-dependencies-cli:
 kicksecure-dependencies-cli depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package kicksecure-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-shared-packages-dependencies-cli:
 whonix-shared-packages-dependencies-cli depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package whonix-shared-packages-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of non-qubes-whonix-workstation-cli:
 non-qubes-whonix-workstation-cli depends on kicksecure-dependencies-cli; however:
  Package kicksecure-dependencies-cli is not configured yet.
 non-qubes-whonix-workstation-cli depends on whonix-shared-packages-dependencies-cli; however:
  Package whonix-shared-packages-dependencies-cli is not configured yet.

dpkg: error processing package non-qubes-whonix-workstation-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of non-qubes-whonix-workstation-xfce:
 non-qubes-whonix-workstation-xfce depends on non-qubes-whonix-workstation-cli; however:
  Package non-qubes-whonix-workstation-cli is not configured yet.

dpkg: error processing package non-qubes-whonix-workstation-xfce (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-shared-packages-recommended-cli:
 whonix-shared-packages-recommended-cli depends on kicksecure-dependencies-cli; however:
  Package kicksecure-dependencies-cli is not configured yet.

dpkg: error processing package whonix-shared-packages-recommended-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of anon-ws-disable-stacked-tor:
 anon-ws-disable-stacked-tor depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package anon-ws-disable-stacked-tor (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-workstation-packages-recommended-cli:
 whonix-workstation-packages-recommended-cli depends on anon-ws-disable-stacked-tor; however:
  Package anon-ws-disable-stacked-tor is not configured yet.

dpkg: error processing package whonix-workstation-packages-recommended-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-workstation-packages-dependencies-pre:
 whonix-workstation-packages-dependencies-pre depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package whonix-workstation-packages-dependencies-pre (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-workstation-packages-dependencies-cli:
 whonix-workstation-packages-dependencies-cli depends on whonix-workstation-packages-dependencies-pre; however:
  Package whonix-workstation-packages-dependencies-pre is not configured yet.

dpkg: error processing package whonix-workstation-packages-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-workstation-packages-recommended-gui:
 whonix-workstation-packages-recommended-gui depends on whonix-workstation-packages-recommended-cli; however:
  Package whonix-workstation-packages-recommended-cli is not configured yet.

dpkg: error processing package whonix-workstation-packages-recommended-gui (--configure):
 dependency problems - leaving unconfigured
Processing triggers for security-misc (3:45.2-1) ...
INFO: triggered security-misc: 'security-misc' security-misc DPKG_MAINTSCRIPT_NAME: 'postinst' $\*: 'triggered /usr' 2: '/usr'
/usr/share/security-misc/lkrg/lkrg-virtualbox: line 10: /usr/libexec/helper-scripts/package_installed_check.bsh: No such file or directory
/usr/libexec/security-misc/mmap-rnd-bits: INFO: Successfully written ASLR map config file:
/etc/sysctl.d/30_security-misc_aslr-mmap.conf
Running SUID Disabler and Permission Hardener... See also:
https://www.kicksecure.com/wiki/SUID_Disabler_and_Permission_Hardener
/var/lib/dpkg/info/security-misc.postinst: INFO: running: permission-hardener enable
permission-hardener: [NOTICE]: Executing: setcap -r /bin/ping
permission-hardener: [NOTICE]: To compare the current and previous permission modes, install 'meld' (or preferred diff tool) for comparison of file mode changes:
    sudo apt install --no-install-recommends meld
    meld /var/lib/permission-hardener-v2/existing_mode/statoverride /var/lib/permission-hardener-v2/new_mode/statoverride
/var/lib/dpkg/info/security-misc.postinst: INFO: Permission hardening success.
Errors were encountered while processing:
 dist-base-files
 kicksecure-dependencies-cli
 whonix-shared-packages-dependencies-cli
 non-qubes-whonix-workstation-cli
 non-qubes-whonix-workstation-xfce
 whonix-shared-packages-recommended-cli
 anon-ws-disable-stacked-tor
 whonix-workstation-packages-recommended-cli
 whonix-workstation-packages-dependencies-pre
 whonix-workstation-packages-dependencies-cli
 whonix-workstation-packages-recommended-gui
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can someone help me troubleshoot this? Or maybe just share their /usr/libexec/helper-scripts/user_create.bsh, maybe that would resolve the issue?

3 Likes

Do you have helper-scripts installed? What does dpkg-query -s helper-scripts show?

3 Likes

Hey arraybol3,
Thank you for your reply.
I just fixed the issue.
Just in case someone else encounters this issue or a similar issue here is what I did

This was the output of dpkg-query -s helper-scripts:

dpkg-query -s helper-scripts
Package: helper-scripts
Status: install ok installed
Priority: optional
Section: misc
Installed-Size: 331
Maintainer: Patrick Schleizer <adrelanos@kicksecure.com>
Architecture: all
Version: 3:23.4-1
Replaces: anon-shared-helper-scripts, anon-ws-leaktest, curl-scripts, python-guimessages, python3-guimessages
Depends: sudo, python3, python3-stem, python3-scapy, python3-yaml, bubblewrap, moreutils
Conffiles:
 /etc/apparmor.d/abstractions/tor-circuit-established-check 0599bd34ad3602d784a7b6bd878b710f
 /etc/apparmor.d/usr.bin.tor-circuit-established-check 1790ee88a8554319034d953e9b56aaec
Description: Helper scripts useful for Linux Distributions
 Contains a script for curl progress bar in terminal. Includes another script
 to convert curl exit codes to curl status messages. Implemented in bash.
 Common code that can be used by other scripts.
 .
 Library that can be used by other (anonymity related) packages that want to
 programmatically get information about states of Tor. Common code, that is
 often required. Includes bash and Python helper scripts.
 .
 Leak Test for Anonymity Distribution Workstations
 Integrated leak test.
 Needs to be manually run.
 See: https://www.whonix.org/wiki/Dev/Leak_Tests
 .
 Translatable GUI Messages
 Generic modules guimessage.py and translations.py.
 Called with two parameters: .yaml file path and yaml section. Return
 translations according to distribution local language (Python 'locale').
 .
 Provides the ld-system-preload-disable wrapper to disable /etc/ld.so.preload
 per application via bubblewrap. Useful if hardened_malloc is being globally
 preloaded and needs to be disabled for some applications.
Homepage: https://github.com/Kicksecure/helper-scripts

I noticed the github repo for helper-scripts which I couldn’t find myself.
I cloned the repo and copied all files from github directory /usr/libexec/helper-scripts/ to my vms /usr/libexec/helper-scripts/ Then running sudo apt-get upgrade fixed the errors

2 Likes

This should not be happening.

Users aren’t expected to manually fix this.

We don’t know why this has happened.

Since this was already manually fixed by the user, it seems unlikely that this can be debugged.

1 Like