EMCC agentdeploy.sh error

When the error below is returned:

ERROR: Make sure the agentDeploy.sh is executed with -softwareOnly option before running it with -configOnly option.

Make sure the AGENT_BASE_DIR is pointing to the right base and parent directory, as below:

/u01/app/oracle/emagent/agent_13.5.0.0.0/sysman/install/agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/emagent AGENT_INSTANCE_HOME=/u01/app/oracle/emagent/agent_inst ORACLE_HOSTNAME=emdev13c01 AGENT_PORT=3879 OMS_HOST=emdev13c01 EM_UPLOAD_PORT=4903 AGENT_REGISTRATION_PASSWORD=welcome1 -configOnly -ignorePrereqs