The simplest approach, whenever possible is to only use either
.deb packages. This will probably save you a lot of headaches in the long run, so look into that first. It seems like nearly anything node-related that is provided by a
.deb package could be installed via
If that really isn't possible, however, you may be able to create "dummy"
.deb packages using
equivs-build to tell
apt that you have the dependencies installed. Note that this could potentially confuse apt if you get things wrong. Also, even if you uninstall
nvm packages, apt will still think you have the substitutes you've defined in the dummy packages until you uninstall the dummy packages themselves.
First, install "equivs" so we can build the dummy packages:
sudo apt-get install equivs
Create a control file that describes the dummy package:
Edit this control file:
Un-comment and change lines in the control file as desired. In particular set the "Provides:" line to list the packages that you've substituted using
nvm. For example:
Version: (version slightly higher than what the apt package actually provides)
Maintainer: Your Name <email@example.com>
Description: Something that will remind you what this does ;)
Build the package:
Finally, install it:
sudo dpkg -i nodejs-dummy_use_the_actual_filename.deb
Rinse and repeat for whatever packages you've substituted using
nvm. If a package depends on a specific version of another package you've replaced with
nvm, you may need to use that exact version number it depends on. I'm not sure what issues might arise from do so, however, and you'll likely need to keep rebuilding your dummy packages whenever the OS packages change versions.