replayed a do-release-upgrade from ubuntu 18.04 to ubuntu 20.04.
Ubuntu 20.04 comes with python 3.8 out of the box.
privacyidea use on my installation python 3.6.
In my case :
Remove old python links
cd /opt/privacyidea/bin/
rm python3.6 python3 python
Copy new python3.8 version to privacyidea directory
which python3
cp -a /usr/bin/python3 /opt/privacyidea/bin/python3
Link new python version
cd /opt/privacyidea/bin/
ln -s python3 python3.8
ln -s python3 python
Now we have to relink all broken links from /opt/privacyidea/lib/python3.6 to python3.8, so we make a copy of python3.6 Copy old python3.6 directory to python3.8
cp -a /opt/privacyidea/lib/python3.6 /opt/privacyidea/lib/python3.8
List all symbolic-links;
find /opt/privacyidea/lib/python3.8 -type l -exec ls {} ; | sort
relink: for this i used a little script:
#!/bin/bash
cd /opt/privacyidea/lib/python3.8
for i in $(find /opt/privacyidea/lib/python3.8 -type l -exec ls {} ; | sort | sed ‘s|.*/||’); do
rm $i
ln -s /usr/lib/python3.8/$i $i
done #last relink
rm config-3.6m-x86_64-linux-gnu
ln -s /usr/lib/python3.8/config-3.8-x86_64-linux-gnu/ config-3.8m-x86_64-linux-gnu
exit
after that, we repaired all broken links If we restart apache2, we get the last error which joerg.giencke has written:
Upgrade all python modules The requirements of privacyidea are found here: