This might happen if your prerequisite's install conditions are not fulfilled after the installation.
These conditions are configured in "Prerequisites"
page --> your prerequisite --> "Install Conditions"
These conditions are evaluated by your setup twice:
1- once before the prerequisite is installed. In this case, the conditions should be false (meaning that the prerequisite is not installed), resulting in the prerequisite being scheduled for installation
2- once after the prerequisite is installed. In this case, the conditions should be true (meaning that the prerequisite was correctly installed)
A way of testing this would be to manually install the prerequisite on your machine and checking whether the conditions are fulfilled.
For instance, let's say your prerequisites writes a registry value, e.g.:
after it is installed. Let's also consider this as your install condition for your prerequisite.
Here, you can manually install the prerequisite and then check for that value. If the value does not exist, the setup will interpret the installation of the prerequisite as a failure.
Additionally, you can go to "Prerequisites"
page --> your prerequisite --> "Properties"
tab and check the "Continue with main installation even if the prerequisite was not installed"
option. This way, the second check I have mentioned above (the check after the prerequisite is installed) will no longer be performed and therefore this message should no longer be encountered.
Hope this helps!