Can't log out from CKAN session


I can log in to my CKAN instance without problems, I can publish and update datasets without errors, but when I try to log out, the system doesn’t allow me to do it. It started after running the following command

sudo apt install python-pastescript

Any help will be greatly appreciated.