Oracle: How to solve ORA-06520

After migrating an Oracle database to a new server, ORA-06520 occurs. This is how to solve it.

Oracle: How to solve ORA-06520

After moving a database from an older to a newer system, I get an error like this:

ORA-06520: PL/SQL: Error loading external library
ORA-06512: at "<owner>.<procedure>", line 1
ORA-06512: at line 4
06520. 00000 -  "PL/SQL: Error loading external library"
*Cause:    An error was detected by PL/SQL trying to load the external
           library dynamically.
*Action:   Ensure that the dynamic library exists, that it is installed
           correctly and that it is not corrupt or otherwise unreadable by
           the operating system.  Also, ensure that the library path in the
           LIBRARY object is correct, including the values of any environment
           variables used in the library path and the directory path values
           of any DIRECTORY objects used by the LIBRARY object.

Unfortunately, I don't know anything of this database, as I'm just the DBA, not the owner of it.

But having a look at the view DBA_LIBRARIES, I can see what's configured:

SQL> select * from dba_libraries where owner like '<owner>';
<owner>
ABC
/u01/app/oracle/product/19/bin/libABC.so
Y   VALID
            0

<owner>
DEF
/u01/app/oracle/product/19/bin/libDEF.so
Y   VALID
            0

After copying the libraries /u01/app/oracle/product/19/bin/lib[ABC|DEF].so from the old to the new system, these packages were able to run succesfully.