I got this error when I was trying to specify Host Credentials in EM 12c cloud control.
Cause: root.sh had not been executed from agent home
Solution: I executed root.sh from agent home and the problem was resolved.
[root@em12 dbhome_1]# /u01/app/oracle/product/agent/core/188.8.131.52.0/root.sh
I hope this information was useful.