There is no such thing as openHABian 4.2.
You installed openHAB 4.2. But it’s unclear if you reinstalled the OS, too, openHABian that is.
If your plan was to move to a newer OS (and maybe Java with it) and upgrade OH, you should separate this into two steps:
- install latest openHAB with openHAB3 and import your existing OH3 config
- upgrade OH on the new box through
openhabian-config
.
See this HOWTO in OH migration FAQ