For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
oracle OS user should have all needed environment variables set within its profile, .bash_profile if you use bash.
You shouldn't run sqlplus as root, you should do it as oracle user instead.
If you, for any reason, need to do it as root, then you could run the oracle's profile before, e.g.
# . <oracle's home directory>/.bash_profile # sqlplus .........
Then create it with this line :
source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
logout oracle, logon again and retry.