Not having fun with Python/Debian 9.1

Well after my last Star Wars Galaxies adventure, where I tried to run MySQL on Linux Subsystem for Windows v1, I got some weird shared memory error, and it wouldn’t run. Even the old BSDDB engine was bombing out trying to create files. So fine, whatever I thought I could move on, and that is when I found out that somehow OpenSSL & Python had utterly collided.

Python 1.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.7/ssl.py", line 98, in import _ssl # if we can't import it, let the error propagate ImportError: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: version `OPENSSL_1_1_0' not found (required by /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so) >>>

Well isn’t that great. I tried un-installing & re-installing Python over and over, along with trying to force re-install OpenSSL. No dice.

So what finally got it working for me was to purge OpenSSL.

apt-get purge libssl1.1

And after that it pulled out everything that was using it, well over 500MB of stuff I’d installed. And for good measure I followed up with the autoremove for an additional 384MB of stuff to remove. And then for the final step, of just installing Python:

[email protected]:~# apt-get install python2.7 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libpython2.7-stdlib libssl1.1 Suggested packages: python2.7-doc The following NEW packages will be installed: libpython2.7-stdlib libssl1.1 python2.7 0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 3,537 kB of archives. After this operation, 12.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://deb.debian.org/debian stretch/main amd64 libssl1.1 amd64 1.1.0j-1~deb9u1 [1,354 kB] Get:2 http://deb.debian.org/debian stretch/main amd64 libpython2.7-stdlib amd64 2.7.13-2+deb9u3 [1,897 kB] Get:3 http://deb.debian.org/debian stretch/main amd64 python2.7 amd64 2.7.13-2+deb9u3 [285 kB] Fetched 3,537 kB in 0s (13.2 MB/s) Preconfiguring packages ... Selecting previously unselected package libssl1.1:amd64. (Reading database ... 27441 files and directories currently installed.) Preparing to unpack .../libssl1.1_1.1.0j-1~deb9u1_amd64.deb ... Unpacking libssl1.1:amd64 (1.1.0j-1~deb9u1) ... Selecting previously unselected package libpython2.7-stdlib:amd64. Preparing to unpack .../libpython2.7-stdlib_2.7.13-2+deb9u3_amd64.deb ... Unpacking libpython2.7-stdlib:amd64 (2.7.13-2+deb9u3) ... Selecting previously unselected package python2.7. Preparing to unpack .../python2.7_2.7.13-2+deb9u3_amd64.deb ... Unpacking python2.7 (2.7.13-2+deb9u3) ... Processing triggers for mime-support (3.60) ... Processing triggers for libc-bin (2.24-11+deb9u4) ... Setting up libssl1.1:amd64 (1.1.0j-1~deb9u1) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up libpython2.7-stdlib:amd64 (2.7.13-2+deb9u3) ... Setting up python2.7 (2.7.13-2+deb9u3) ... Processing triggers for libc-bin (2.24-11+deb9u4) ...

So now you think its going to be broken right? It’s the same libssl package! I didn’t even run an ‘apt-get update’. And guess what?! You would be wrong.

[email protected]:~# python Python 2.7.13 (default, Sep 26 2018, 18:42:22) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import ssl >>>

That’s right, it’s now working.

Speaking of Picard, I hear there will be a new series, inspiringly named ‘Picard’. Apparently it’s going down the same path as STD, complete with a lack of backers, and merch. I’m hoping it’ll be something watchable, although they certainly cannot afford any of the TNG cast as they apparently have zero budget. Maybe it’ll end up as another ‘Jake Skywalker’ or ‘Not my Picard’. But the bad reboot 25% contractual difference could be the difference between something new, or something so divergent that there was no point in even attempting to be a Trek.

Author: neozeed

I live in SE Asia, doing generic work, enjoying my life & family

7 thoughts on “Not having fun with Python/Debian 9.1”

  1. If I’m reading the output correctly, you somehow ended up with a 2018 build of Python 1.13 that is importing modules from 2.7 which in turn depends on SSL. After purging and reinstalling, you have a Python 2.7 using modules from 2.7 which actually works. These days I only see Python 1.x when messing around with historical distributions – how did you end up with it? Was it the default when “python” is invoked?

    1. sadly it’s too late to tell as I’ve purged it. That was the default phython in my path. I did find the historical first release on a usenet/CD-ROM but I built that for Windows… and certainly not for Linux, nor in the system path. And I’m pretty sure it’s 1.00

      I don’t know what this 1.13 was, and it certainly got purged out once I got it out of the way.

      And it wasn’t even on that machine. I don’t know what happened with it there ūüėź

    2. I have to run out, so I can’t test for at least another day, but this is the history of all the apt stuff I did in the instance

      apt-get update;apt-get upgrade;apt-get install libbzlib-dev
      apt-get install bzip-dev
      apt-get install libbzip-dev
      apt-get install libbz2-dev
      apt-get purge openssh-server
      apt-get purge openssh-server
      apt-get purge openssh-server
      apt-get install openssh-serve
      apt-get install openssh-server
      apt-get update;apt-get upgrade
      apt-get install lynx
      apt-get update;apt-get upgrade
      apt-get install ftp
      apt-get update;apt-get upgrade
      apt-get update;apt-get ugprade
      apt-get install nslookup
      apt-get install domaintools
      apt-get instlal dnsutils
      apt-get install dnsutils
      apt-get install perf
      apt-get install linux-tools
      apt-get install linux-perf-4.4
      apt-get install linux-perf
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get dist-upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get update;apt-get upgrade
      apt-get install build-essential
      apt-get install pkg-config
      apt-get install libz-dev
      apt-get install libglib2.0-dev
      apt-get install libpixman-dev
      apt-get install pixman-dev
      apt-get install libpixman-1-dev
      apt-get install libfdt-dev
      apt-get install unrar
      apt-get install rar
      apt-get install unzip
      apt-get install textutils
      apt-get install sharutils
      apt-get install unzoo
      apt-get install zoo
      apt-get install minicom
      apt-get install elvis
      apt-get install nvi
      apt-get purge vim
      apt-get install libmysqlclient
      apt-get install default-libmysqlclient-dev
      apt-get install libmariadbclient-dev package
      apt-get install libmariadbclient-dev
      dpkg -i mysql-apt-config_0.8.9-1_all.deb apt-get install lsb-release
      apt-get install lsb-release
      dpkg -i mysql-apt-config_0.8.9-1_all.deb apt-get install lsb-release
      apt-get install mysql-server
      apt-get install mysql-client
      apt-get install mysql-client
      apt-get update
      apt-get upgrade
      apt-get install python-openssl
      apt-get install uudecode
      apt-get install uuencode
      apt-get install sharutils
      apt-get install install python python-apt-common python-minimal python2.7 python2.7-minimal
      apt-get install python python-apt-common python-minimal python2.7 python2.7-minimal
      apt-get purge python python-apt-common python-minimal python2.7 python2.7-minimal
      apt-get autoremove
      apt-get install python python-apt-common python-minimal python2.7 python2.7-minimal libpython2.7-stdlib libpython2.7-stdlib
      apt-get install libssl-dev
      apt-get purge libssl-dev
      apt-get clean
      apt-get autoremove --purge
      sudo apt-get install --reinstall libssl1.0.0
      apt-get purge libssl1.1
      apt-get purge libssl1.1
      apt-get install python2.7
      apt-get autoremove purge
      apt-get autoremove
      apt-get install python2.7

    3. I ended up re-building the ancient python and it was version 0.90 from a comp.sys.sources cd-rom archive. It’s so old that it doesn’t even report a version number or string, so it most certainly wasn’t that.

      I still don’t see what would have caused some phantom ancient version of python to creep in, but purging everything that used openssl-1.1 got it back to where it should have been, although clearly removing and re-adding 2.7 a few times didn’t.

  2. Everything in the post-reinstall version block that comes from Py_GetVersion() looks the same down to the character except that “2.7” has been replaced “1” in “1.13”… This seems more likely to be text mangling that something actually reporting version 1.13.

    1. I don’t get it. Even purging & re-installing 2.7 didn’t help, it wasn’t until I purged openssl…. at least the packages ‘worked’ in that I could pull them out & put them back in.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.