First error means there are duplicate records in your os_systems column of apps table. Naturally, you can't put a unique constraint on it.
Second error is because of the absence of the unique constraint that we tried to create in first statement (and failed).
If you can't remove duplicate values from os_systems column of apps table, you can't do this activity.