I didn't manage to find a solution to my problem here but I fixed it myself so I'm posting it just in case it helps someone else.
I installed JLink 5.12.6 and nRF5x Command Line Tools 8.4.0 on 64 bit Ubuntu.
When trying to execute "./nrfjprog -v" the following error comes out:
ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please
ERROR: reinstall latest JLinkARM from Segger webpage.
In /opt/SEGGER/JLink/ there is shared library libjlinkarm.so.5. Renaming it to libjlinkarm.so fixed the problem for me as it seems that the library name is hardcoded.