The issue seems to be a broken deployment of ioFog platform under the default namespace. If you try a command like
iofogctl create namespace abrakadabra, that should work. This should prove to you that your installation of iofogctl is fine.
Could you please try to run
iofogctl disconnect. This will clear all local data of your failed deployment. And then try to perform whatever deployment steps you did before. But try to use iofogctl without sudo. You should never need to do use sudo with iofogctl under normal circumstances.
I would also recommend deleting any dangling containers that have the prefix
iofog in the name. If you just want to delete all running containers on your machine, run
docker rm -f $(docker ps -aq).
If you would like to uninstall iofogctl, try
sudo apt remove --purge iofogctl.