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:
  /nix/store/bmfhamimmiy03via25aa5zc54bfs3bag-oracle-xe-11.2.0-1.0.x86_64.rpm.drv
  /nix/store/lvjn18wm4448arz52wm4whbhq2gcblgf-oracle-xe-11.2.0.drv
  /nix/store/cy4r76ga0cipj2r968izbx7gdr9rdd64-system-path.drv
  /nix/store/4hk8ab4y465w88a1hdrf7rw28b9r2iya-dbus-1.drv
  /nix/store/3zdb32s7c6msbih9g82draza9xsh22b0-unit-dbus.service.drv
  /nix/store/10ngpm2rn7fnrx75dldszjwa4wzpf5md-user-units.drv
  /nix/store/n6m0pwpj79pxhwc4nh2nh3iy55s991ml-oracle-xe-11.2.0_fish-completions.drv
  /nix/store/13f0xmn22mnwd5s6y97fq6as53a5wayg-system_fish-completions.drv
  /nix/store/cfldfngl932b62bsj7cr10dvmj21ds4g-unit-polkit.service.drv
  /nix/store/hwgp8w1pxzb6bbnf625fn1wdcq0hg0f1-unit-accounts-daemon.service.drv
  /nix/store/ip7y5ba4v9n2sba39066si6118vjxp60-unit-dbus.service.drv
  /nix/store/mdca97pbbaw2nlcm5cxxxzhmzh6invp4-unit-systemd-fsck-.service.drv
  /nix/store/yqix08w962my96d0vqavgld8q1b3ihxg-system-units.drv
  /nix/store/9bb9bqdxn772095q6khcds8qs2xc6w0y-etc.drv
  /nix/store/nk2mr5hj93sihbg034rcdxxj45dx1bk0-nixos-system-nixos-19.09.2079.8731aaaf8b3.drv
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 http://www.oracle.com/technetwork/products/express-edition/downloads/ 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
or
  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.