Possible cause of problem:- When you login through "Root" user and "SU - oracle" to switch oracle user then this type of error occurred.
Solution:- To fix this error
1) Logout from "Root" user and login through " Oracle" user.
2) Using "Oracle user run on os promp "NETCA" command to configure listener.