Let me explain,
So this for my experience cause by non matching library versions. In case the library is missing the program would fail to start. This would result in a different error message.
Normaly this is caused by missing updates in almost any cases when newest Software applications like node or other things are used with older operating system libraries.
The other reason normaly is are broken package dependencies in the OS/Ubuntu, which is really hard to fix. May be npm brings also an own package dependency which may also a possible reason (but I believe it’s ok right now)
So coming to Ubuntu LTS version. LTS Version means Long Time Support. This results in longer maintenance with stable ABIs, meaning older library versions. So you pay the longer maintenance with not obtaining the last or bleeding edge versions of libraries.
So here it seems that a missing “library function” is caused by a newer library version, that is possible not maintained anymore.
So you have the following options:
- Update the Ubuntu LTS version:
sudo apt-get update && sudo apt-get dist-upgrade
sudo apt-get autoremove to delete no longer needed packages
This insures you have the lates maintenace setup.
If it works then fine
- next I would update npm to the lastest update to insure you have the latest version
- them I would do an npm update and update all packages.
- test if you system is working. If fine ok
It everything of this does not work. I recommend to make a virtualInstance (e.g. using VirtualBox) of a current non LTS version of Ubunto or another Linux distri.
Then install you setup and look if it works.
- I’m pretty sure it will work from there.
I’m using debian 9 and debian 10 instances here. They are pretty equal and are running the the latest solidity/openZeppelin/node stuffe and it works. Ubuntu/Debian have the prettey same base system. So it should also work for you
My other advice is: Searching and Fixing package dependencies are very time consuming. Reinstall and test in a virtual OS-Instance just save a lot of time. (I did Linux distri struff work 10+ years)
That’s why the short answer for me is. Use the latest Ubuntu and don’t use LTS Versions for development, cause they made for server hosting.
So that’s the way I would do it personally