-sed -e 's%LIBS= -ldl -lpthread -lutil%LIBS= -ldl -lpthread -lutil -lstdc++%g' Makefile > Makefile_new
-mv -f Makefile_new Makefile
+sed -e 's%LIBS= -ldl -lpthread -lutil%LIBS= -ldl -lpthread -lutil -lstdc++%g' Makefile > _Makefile
+mv -f _Makefile Makefile
+# vsr: socket module is not compiled on RedHat9 because of absent KERBEROS include/libs flags
+sed -e "s%\[('USE_SSL',1)\]%\[('USE_SSL',1),('OPENSSL_NO_KRB5',None)\]%g" setup.py > _setup.py
+mv -f _setup.py setup.py