If DBMS_RANDOM hasn't been installed on your machine, then, as SYS, you should run the following scripts exactly in this order:

dbmsoctk.sql; prvtoctk.sql; dbmsrand.sql