2019-03-17 I borked my system

I was unhappy about my Perl installation. I was getting a warning regarding XS. Some of the libraries I had installed were compiled for a different version of Perl. Sure, I had installed Perl modules using `cpan` and `cpanm`. Apparently I had received a new Perl via an upgrade of PureOS. Sadly, I didn’t know how to quickly find all the modules which included XS and reinstall and recompile them.

Here’s a start:

find $(perl -e 'print join " ", @INC') -name XS.so

But then again... Perhaps it would make more sense to use `perlbrew`. It’s what I use on my server. Just ignore the system Perl!

But it also involves a lot of downloading and installing of Perl modules... That’s not cool. So perhaps I should continue using the system Perl and just try and replace all the packages I had installed with system packages? Let the package manager handle it?

Sadly, I immediately ran into the missing package `Mastodon::Client`. And once you try to install it, it pulls in all the dependencies. Some of them I might have installed using the system package manager, but `cpanm` doesn’t know about that.

So back to `perlbrew`, right? And I can delete all the system Perl modules...

Get the list:

apt list --installed "*-perl" | grep -v automatic | sed 's/\/.*//'

And run the command:

sudo apt remove libcaptcha-recaptcha-perl libcapture-tiny-perl \
libcrypt-random-seed-perl libcrypt-rijndael-perl libdatetime-perl \
libdatetime-timezone-perl libhtml-template-perl libhttp-date-perl \
libhttp-server-simple-perl libjson-perl liblist-allutils-perl \
liblocale-gettext-perl libmce-perl libmldbm-perl libmodern-perl-perl \ libmojolicious-perl libnet-server-perl libnet-whois-parser-perl \
libpod-strip-perl librpc-xml-perl libtext-charwidth-perl libtext-iconv-perl \
 libtext-markdown-perl libtext-wrapi18n-perl libtime-parsedate-perl \
libxml-atom-perl libxml-libxml-perl

Whatever, right? Enter! Enter!

But wait... what’s this? This is *all wrong!*

Removing gnome-shell-extensions (3.30.1-1) ...
Removing gdm3 (3.30.2-1pureos1) ...
Removing gnome-getting-started-docs (3.30.0-1) ...
Removing gnome-user-docs (3.30.2-1) ...
Removing yelp (3.31.90-1) ...
Removing inkscape (0.92.4-2) ...
Removing libgtkspell0:amd64 (2.0.16-1.2) ...
Removing aspell-de (20161207-7) ...
Removing aspell-en (2018.04.16-0-1) ...
Removing aspell (0.60.7~20110707-6) ...
Removing blends-tasks (0.7.2) ...
Removing chrome-gnome-shell (10.1-5) ...
Removing pureos-standard (0.9.4) ...
Removing pureos-minimal (0.9.4) ...
Removing console-setup (1.188) ...
Removing console-setup-linux (1.188) ...
Removing debconf-i18n (1.5.71) ...
Removing devscripts (2.19.3) ...
Removing dhelp (0.6.25) ...
Removing docbook2x (0.8.8-17) ...
Removing enchant (1.6.0-11.1+b1) ...
Removing evince (3.30.2-3) ...
Removing gnome-todo (3.28.1-2) ...
Removing gnome-contacts (3.30.2-1) ...
Removing libfolks-eds25:amd64 (0.11.4-1+b2) ...
Removing gedit (3.30.2-2) ...
Removing gnome-sushi (3.30.0-2) ...
Removing gir1.2-evince-3.0:amd64 (3.30.2-3) ...
Removing gnome-maps (3.30.3-1) ...
Removing gir1.2-webkit2-4.0:amd64 (2.22.6-1) ...
Removing gnome-calendar (3.30.1-2) ...
Removing gnome-control-center (1:3.30.3-1) ...
Removing gnome-initial-setup (3.30.0-1pureos2) ...
Removing gnome-online-accounts (3.30.1-2) ...
Removing gnome-session (3.30.1-2pureos1) ...
Removing gnome-software (3.28.0-1pureos1) ...
Removing gnulib (20140202+stable-3.1) ...
Removing xorg (1:7.7+19) ...
Removing xserver-xorg (1:7.7+19) ...
Removing xserver-xorg-video-all (1:7.7+19) ...
Removing xserver-xorg-video-vmware (1:13.3.0-2) ...
Removing xserver-xorg-video-vesa (1:2.4.0-1) ...
Removing xserver-xorg-input-all (1:7.7+19) ...
Removing xserver-xorg-input-libinput (0.28.2-1) ...
Removing xserver-xorg-video-qxl (0.1.5-2+b1) ...
Removing xserver-xorg-video-nouveau (1:1.0.16-1) ...
Removing xserver-xorg-input-wacom (0.34.99.1-1) ...
Removing libaudio-scrobbler-perl (0.01-2.3) ...
Removing libcaptcha-recaptcha-perl (0.98+ds-1) ...
Removing perlbrew (0.86-1) ...
Removing lintian (2.9.1) ...
Removing libcapture-tiny-perl (0.48-1) ...
Removing libcrypt-random-seed-perl (0.03-1) ...
Removing libcrypt-rijndael-perl (1.13-1+b5) ...
Removing librpc-xml-perl (0.80-2) ...
Removing libdatetime-format-iso8601-perl (0.08-2) ...
Removing libdatetime-format-builder-perl (0.8100-2) ...
Removing libdatetime-format-strptime-perl (1.7600-1) ...
Removing libxml-atom-perl (0.42-2) ...
Removing libdatetime-perl:amd64 (2:1.50-1+b1) ...
Removing libdatetime-timezone-perl (1:2.23-1+2018i) ...
Removing libevview3-3:amd64 (3.30.2-3) ...
Removing libxml-xpath-perl (1.44-1) ...
Removing libnet-dbus-perl (1.1.0-5+b1) ...
Removing libxml-twig-perl (1:3.50-1) ...
Removing libxmlrpc-lite-perl (0.717-1) ...
Removing libsoap-lite-perl (1.27-1) ...
Removing libgitlab-api-v4-perl (0.16-1) ...
Removing libgoa-backend-1.0-1:amd64 (3.30.1-2) ...
Removing libgspell-1-1:amd64 (1.6.1-2) ...
Removing libhtml-form-perl (6.03-1) ...
Removing libhtml-template-perl (2.97-1) ...
Removing libhttp-daemon-perl (6.01-3) ...
Removing libhttp-server-simple-perl (0.52-1) ...
Removing libjson-perl (4.02000-1) ...
Removing liblist-allutils-perl (0.15-1) ...
^[Removing libparse-debianchangelog-perl (1.2.0-13) ...
Removing libmce-perl (1.838-1) ...
Removing libmldbm-perl (2.05-2) ...
^[Removing libmodern-perl-perl (1.20180901-1) ...
Removing libmojo-server-fastcgi-perl (0.50-1) ...
Removing libmojolicious-perl (8.12+dfsg-1) ...
Removing libnet-server-perl (2.009-1) ...
Removing libnet-whois-parser-perl (0.08-1) ...
Removing libpod-strip-perl (1.02-2) ...
Removing libtext-wrapi18n-perl (0.06-7.1) ...
Removing libtext-charwidth-perl (0.04-7.1+b1) ...
Removing libtext-markdown-perl (1.000031-2) ...
Removing libtime-parsedate-perl (2015.103-3) ...
Removing texinfo (6.5.0.dfsg.1-4+b1) ...
Removing libxml-simple-perl (2.25-1) ...
Removing libxml-libxslt-perl (1.96-1+b1) ...
Removing libxml-sax-expat-perl (0.51-1) ...
Removing libyelp0:amd64 (3.31.90-1) ...
Removing xserver-xorg-video-amdgpu (18.1.99+git20190207-1) ...
Removing xserver-xorg-video-ati (1:18.1.99+git20190207-1) ...
Removing xserver-xorg-video-fbdev (1:0.5.0-1) ...
Removing xserver-xorg-video-intel (2:2.99.917+git20180925-2) ...
Removing xserver-xorg-video-radeon (1:18.1.99+git20190207-1) ...
Removing xserver-xorg-core (2:1.20.3-1) ...
Removing keyboard-configuration (1.188) ...
Removing libxml-parser-perl (2.44-4) ...
Removing libxml-libxml-perl (2.0134+dfsg-1) ...
Removing libwww-perl (6.36-1) ...
Removing libfile-listing-perl (6.04-1) ...
Removing libhttp-cookies-perl (6.04-1) ...
Removing libhttp-negotiate-perl (6.01-1) ...
Removing libhttp-message-perl (6.18-1) ...
Removing libhttp-date-perl (6.02-1) ...
Removing tasksel-data (3.50) ...
Removing liblwp-protocol-https-perl (6.07-2) ...
Removing tasksel (3.50) ...
Removing liblocale-gettext-perl (1.07-3+b4) ...
Removing mutter (3.30.2-6) ...
Removing zenity (3.30.0-2) ...
Removing libwebkit2gtk-4.0-37:amd64 (2.22.6-1) ...
Removing libenchant1c2a:amd64 (1.6.0-11.1+b1) ...
Removing hunspell-en-us (1:2018.04.16-1) ...
Removing dictionaries-common (1.28.1) ...
Removing 'diversion of /usr/share/dict/words to /usr/share/dict/words.pre-dictionaries-common by dictionaries-common'
Removing evolution-data-server (3.30.5-1) ...
Removing libedataserverui-1.2-2:amd64 (3.30.5-1) ...
Removing libtext-iconv-perl (1.7-5+b7) ...
Removing gnome-shell (3.30.2-3) ...

Nooooooo! It took so long to abort the operation, now it’s all borked, surely.

OK, how to I recover from this?

apt install evince inkscape gnome pureos-standard perlbrew aspell-de

I hope? Wish me luck!

Fist, switch to a stable Perl using `perlbrew` and get the modules installed. At this point I’m just trying to finish the task I set out to do, hours ago.

​#Administration

Comments

(Please contact me if you want to remove your comment.)

And I think I’m back! Restarted the system and no problem. Emacs works. Browser works. Phew! 😅

– Alex Schroeder 2019-03-17 21:53 UTC

---

Oops!

For what it’s worth, I prefer to package any missing libraries as `.deb` packages myself and install them. `dh-make-perl --cpan MODULE` makes this easy, usually.

(If you need much newer versions of modules, especially “low level” ones, it might not be feasible to go this way, though.)

– Adam 2019-03-17 22:11 UTC

Adam

---

Oh, interesting! Thank you for the suggestion.

– Alex Schroeder 2019-03-18 06:10 UTC