Reiterating the steps to replicate:
Fresh install of Ubunutu 18.04
Fully update operating system.
Reboot.
Install Gluu 3.1.6 via apt.
Start basic gluu /sbin/gluu-server-3.1.6 start
Login to chroot /sbin/gluu-server-3.1.6 login
Perform the following steps that work fine on Ubunutu 16.04 with Gluu 3.1.6:
apt-get update
apt-get install software-properties-common
add-apt-repository universe
add-apt-repository ppa:certbot/certbot
apt-get update
apt-get install certbot python-certbot-apache
Up to this point, everything seems to work the same on both Ubuntu 16.04/Glluu-3.1.6 chroot, and Ubuntu 18.04/Gluu-3.1.6 chroot.
Now, here is where it gets stuck and cannot proceed further, because of conflicting installed OpenSSL 1.1.0 older SSL chat is included in the chroot and I can't figure out how to remove, and so even though desired OpenSSL 1.1.1 is installed, it isn't loading the library dependencies, so can run certbot to create SSL certificates:
```
root@tfndevau1:~# certbot -d tfndevau1.thefantasy.network
Traceback (most recent call last):
File "/usr/bin/certbot", line 11, in
load_entry_point('certbot==0.31.0', 'console_scripts', 'certbot')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2693, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2324, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2330, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/certbot/main.py", line 10, in
import josepy as jose
File "/usr/lib/python3/dist-packages/josepy/init.py", line 44, in
from josepy.interfaces import JSONDeSerializable
File "/usr/lib/python3/dist-packages/josepy/interfaces.py", line 8, in
from josepy import errors, util
File "/usr/lib/python3/dist-packages/josepy/util.py", line 4, in
import OpenSSL
File "/usr/lib/python3/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 16, in
from OpenSSL._util import (
File "/usr/lib/python3/dist-packages/OpenSSL/_util.py", line 6, in
from cryptography.hazmat.bindings.openssl.binding import Binding
File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 13, in
from cryptography.hazmat.bindings._openssl import ffi, lib
ImportError: /usr/local/lib/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by /usr/lib/python3/dist-packages/cryptography/hazmat/bindings/_openssl.abi3.so)
```
Works fine in regular Ubuntu 18.04 (not chroot) of the same server, but does not work inside the chroot because of the conflict between the chroot previously installed older openssl 1.1.0h (vulnerable/insecure), and the updated openssl 1.1.1 (safer).
I can reproduce this problem on every Ubuntu 18.04 server we have setup.
Steps all work fine in 16.04 servers (but 16.04 is near End of Life (EOL), so must get this working on 18.04).