About Me

Database and GIS Consultant.

Wednesday, September 9, 2020

Can't locate util.pm in @INC (you may need to install the util module)

Error message when creating dictionary views and system stored procedures.

Can't locate util.pm in @INC (you may need to install the util module) 


Environment:

Database Software: Oracle 12c Release 2

Operating System: Windows Server 2012 R2 Standard - 64 Bit


Problem: This script "catcdb.sql", calls a perl script "catcdb.pl", both these files are located in "ORACLE_HOME\rdbms\admin" folder. 


There is a bug in Oracle 12c R2 base release, the perl script "catcdb.pl" will look for a utility module called "util.pm" in the "ORACLE_HOME\rdbms\admin" folder which is absent by default, throwing the below error message.

Can't locate util.pm in @INC (you may need to install the util module) (@INC contains: ORACLE_HOME/rdbms/admin ORACLE_HOME/perl/site/lib ORACLE_HOME/perl/lib .) at ORACLE_HOME/rdbms/admin/catcdb.pl line 35. BEGIN failed--compilation aborted at ORACLE_HOME/rdbms/admin/catcdb.pl line 35.


Workaround: Copy "util.pm" from "ORACLE_HOME\perl\lib\Hash" to "ORACLE_HOME\rdbms\admin" folder

> copy F:\Oracle12cR2_64Bit_DB\product\perl\lib\Hash\util.pm F:\Oracle12cR2_64Bit_DB\product\rdbms\admin


Exit out of SQL*Plus, reconnect and rerun the "catcdb.pl" script.


Hope it helps!






No comments: