When possible, this is solved by allowing simultaneous installations of the different dependencies.
The existing dependency, along with all software that depends on it, must be uninstalled in order to install the new dependency.