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/220.127.116.11.0/root.sh
I hope this information was useful.