retroarch 1.8.7 is not supported yet. the retroarch install script is hard-coded to 1.8.6 until we test 1.8.7 and make the necessary changes, such as the above. you must have modified it.