While applying adop patch "Importing Function Definition for `BASH_FUNC_module"



Error:

When attempting to apply a patch using adop or while starting services using adadminscrvctl.sh script, the following may occur on Oracle Linux 6 64-bit server or Red Hat Enterprise 6.


sh: module: line 1: syntax error: unexpected end of file
sh: error importing function definition for 'BASH_FUNC_module'

or

sh: module: line 1: syntax error: unexpected end of file
sh: error importing function definition for `module'


Solution:

1) Connect as root:

 Please rename the /etc/profile.d/modules.sh to /etc/profile.d/modules.sh.bkup 


# mv /etc/profile.d/modules.sh /etc/profile.d/modules.sh.bkup

2) Retry the patch again






If you like please follow and comment