> Is there an equivalent for C/C++ programs? [...] For C/C++ all I know are multiple different possible build and make systems, but none works like a package manager, as far as I know
Downloading the source by hand, trying to wrangle what dependencies it has not vendored (which may or may not be available through your system package managers, in versions which may or may not be recent enough), and trying to find out how to build it.
Though do note that this issue can also hit when installing python, js, or rust package, if they ultimately have native dependencies. Their respective build systems will generally try to make it work out of the box, but if your configuration was not specifically tested / supported it can break with fun C-level compilation errors.