Cannot install Oracle Database (oracleXE)

I need to install Oracle Database for a school project.

I’m on NixOS 19.09.

When I rebuild my system.

❮ sudo nixos-rebuild switch --upgrade
unpacking channels...
building Nix...
building the system configuration...
these derivations will be built:
building '/nix/store/bmfhamimmiy03via25aa5zc54bfs3bag-oracle-xe-11.2.0-1.0.x86_64.rpm.drv'...

Unfortunately, we cannot download file oracle-xe-11.2.0-1.0.x86_64.rpm automatically.
Please go to to download it yourself, and add it to the Nix store
using either
  nix-store --add-fixed sha256 oracle-xe-11.2.0-1.0.x86_64.rpm
  nix-prefetch-url --type sha256 file:///path/to/oracle-xe-11.2.0-1.0.x86_64.rpm


builder for '/nix/store/bmfhamimmiy03via25aa5zc54bfs3bag-oracle-xe-11.2.0-1.0.x86_64.rpm.drv' failed with exit code 1
cannot build derivation '/nix/store/lvjn18wm4448arz52wm4whbhq2gcblgf-oracle-xe-11.2.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/n6m0pwpj79pxhwc4nh2nh3iy55s991ml-oracle-xe-11.2.0_fish-completions.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/cy4r76ga0cipj2r968izbx7gdr9rdd64-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/nk2mr5hj93sihbg034rcdxxj45dx1bk0-nixos-system-nixos-19.09.2079.8731aaaf8b3.drv': 1 dependencies couldn't be built
error: build of '/nix/store/nk2mr5hj93sihbg034rcdxxj45dx1bk0-nixos-system-nixos-19.09.2079.8731aaaf8b3.drv' failed

Then I downloaded it manually from Oracle’s website and renamed it from oracle-database-xe-18c-1.0-1.x86_64.rpm to oracle-xe-11.2.0-1.0.x86_64.rpm so it matches the suggestions from nix.

❮ sudo nix-store --add-fixed sha256 oracle-xe-11.2.0-1.0.x86_64.rpm
When I try to rebuild the system and I get the same first error.

How should I install it I’m clueless.

That file probably has a different sha256 and will therefore have a different location in the store. You need to either load the correct RPM or override the derivation to search for the newer RPM by providing the new name and new hash.

Could you give a detailed explanation how I should go about it?

Which path do you want to take, downloading the correct RPM or trying to install the new one?

As I have no clue about oracle DB, I’d expect that there will be a lot of things with the new version that won’t work correctly when just overriding the name, version and sha.

As of my lecture it doesn’t matter which version I end up using. I’m guessing if 11.x is the easier to install, but just to download it Oracle needs a whole novel of information about me… I’m not doing that, so 18c-x version it is. I might install it on some VM with another distro :frowning:. Anyway what do you think?

If its just for some course and you don’t need the software after that, the easiest is probably just installing the 18-XE into a CentOS VM or docker.

Thanks for your help that is what I’m going to do.

Hey ! Today I published an “Oracle Database” flake I have been working on since a couple of months, very sporadically, here and there.

Find the thread here: Packaging Oracle Database 23c

Feel free to join to improve it, once we’ll have something decent, I’ll commit it to nixpkgs as a NixOS module.