@HaoTian Usually when you have to resort to that kind of workaround, there's something else to be fixed.
Running development tools and software as root/admin is usually a pretty bad idea. You can destroy your system pretty easily if you execute your application and it contains for example some innocent code that deletes folders and you start that at the root of your disk.