Always return the following information when installing the new version cocos2d (cocos2d 2.0-rc1) with the sudo/users/papabox/downloads/cocos2d-iphone-2.0-rc1/install-templates.sh-F command in a lion system:
1 cocos2d-iphone template installer 2 3 Error: Do not run this script as root. 4 5 'root' is no longer supported 6 7 RECOMMENDED WAY: 8 /Users/papabox/Downloads/cocos2d-iphone-2.0-rc1/install-templates.sh -f
After searching on the internet found that there has been a buddy (blog address: http://hulefei29.iteye.com/blog/1493653) find out is the install-templates.sh file in the following code to determine the root permission is a problem
1 # Make sure root is not executed 2 if [[ "$(id -u)" == "0" ]]; then 3 echo "" 4 echo "Error: Do not run this script as root." 1>&2 5 echo "" 6 echo "'root' is no longer supported" 1>&2 7 echo "" 8 echo "RECOMMENDED WAY:" 1>&2 9 echo " $0 -f" 1>&2 10 echo "" 11 exit 1 12 fi
You only need to delete the root script code.
Then run the command sudo/users/papabox/downloads/cocos2d-iphone-2.0-rc1/install-templates.sh-F to install it. If you enter the password, enter the password, and then you can install it properly!
PS:/users/papabox/downloads/cocos2d-iphone-2.0-rc1/install-templates.sh is my path. Replace this with your own path.
Reference blog: http://hulefei29.iteye.com/blog/1493653