Well, i recently uninstall Oracle SQL developer... since that, when I open a terminal it shows me this:

bash: /u01/app/oracle/product/11.2.0/xe/bin/nls_lang.sh: No such file or directory

And I don't know how to remove it. Any suggestions?

enter image description here

  • Do grep -n 'nls_lang' ~/.bashrc in terminal. It probably put a config line there. – Sergiy Kolodyazhnyy Jun 6 '18 at 23:44
  • still appearing :( – Sergio Jun 7 '18 at 2:24
  • What did grep command tell you, first of all ? – Sergiy Kolodyazhnyy Jun 7 '18 at 2:25
  • 1
    120:export NLS_LANG=$ORACLE_HOME/bin/nls_lang.sh – Sergio Jun 7 '18 at 3:19
  • Very well. Hold on a minute, will write an answer. – Sergiy Kolodyazhnyy Jun 7 '18 at 3:22

As solved in the comments via checking your ~/.bashrc file via grep -n 'nls_lang' ~/.bashrc, there's

export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`

segment on the line 120. Simply remove that line or comment out, and the error won't appear again.

The backticks are a form of command-substitution, so this expands $ORACLE_HOME to specific directory, concatenates it with /bin/nls_lang.sh. and executes that script. The output of that script should have been saved to NLS_LANG variable, and exported for use when that software is called from command line. In general, export makes variables available to whatever process shell starts.

As you have uninstalled the software, so the nls_lang.sh is also gone, but your ~/.bashrc file has remained unchanged. Since bash reads ~/.bashrc whenever you open interactive session in terminal, it still tries to execute that non-existing script, and that's why you see the error. What you should do, is go through ~/.bashrc and probably remove the related variables such as $ORACLE_HOME and others.

  • Ok, I fixed it. Thank you so much for your help. Peace! – Sergio Jun 7 '18 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.