1
chemhack 2013-05-28 22:54:00 +08:00 2
nvm
|
3
JeremyWei 2013-05-29 12:02:42 +08:00 1
npm install n
|
4
lyuehh 2013-05-29 12:06:26 +08:00 1
brew update
brew upgrade |
6
flowerpiggy 2013-05-29 12:55:53 +08:00 1
#给你个脚本。
#升级到最新 VERSION=$(curl http://nodejs.org/download/ | grep 'Current version:' | grep -o "v[0-9]\+\.[0-9]\+\.[0-9]\+") #check if linux is 64 or 32 bit if [ "$SYS64" == 1 ]; then FILENAME="node-${VERSION}-linux-x64.tar.gz" else FILENAME="node-${VERSION}-linux-x86.tar.gz" fi wget "http://nodejs.org/dist/${VERSION}/${FILENAME}" tar -zxf "${FILENAME}" -C /usr/local/ --strip-components=1 rm -f "${FILENAME}" if [ $(node -v) == $VERSION ]; then echo "Upgrade successful $VERSION" fi ############################################################ #升级到特定版本,例如0.8.20 VERSION="v0.8.20" if [ $(uname -m | grep '64' | wc -l) == 1 ]; then FILENAME="node-${VERSION}-linux-x64.tar.gz" else FILENAME="node-${VERSION}-linux-x86.tar.gz" fi wget "http://nodejs.org/dist/${VERSION}/${FILENAME}" tar -zxf "${FILENAME}" -C /usr/local/ --strip-components=1 rm -f "${FILENAME}" if [ $(node -v) == $VERSION ]; then echo "Upgrade successful $VERSION" fi |
7
flowerpiggy 2013-05-29 12:58:21 +08:00 1
#上面升级到最新版本脚本少了一句, SYS64=$(uname -m | grep '64' | wc -l) 请忽略,用下面这个
VERSION=$(curl http://nodejs.org/download/ | grep 'Current version:' | grep -o "v[0-9]\+\.[0-9]\+\.[0-9]\+") #check if linux is 64 or 32 bit SYS64=$(uname -m | grep '64' | wc -l) if [ "$SYS64" == 1 ]; then FILENAME="node-${VERSION}-linux-x64.tar.gz" else FILENAME="node-${VERSION}-linux-x86.tar.gz" fi wget "http://nodejs.org/dist/${VERSION}/${FILENAME}" tar -zxf "${FILENAME}" -C /usr/local/ --strip-components=1 rm -f "${FILENAME}" if [ $(node -v) == $VERSION ]; then echo "Upgrade successful $VERSION" fi |
8
agassi_yzh 2013-05-29 13:00:31 +08:00 1
nvm
|
9
xieren58 2013-05-29 21:56:09 +08:00 1
linux系列用nvm 不解释,win下直接重新装得了
|
10
airwalker 2013-05-29 22:02:08 +08:00 1
|