安装lessc
安装lessc
(1)先安装nodejs
wget https://nodejs.org/dist/v4.3.1/node-v4.3.1-linux-x64.tar.xz
下载完成后解压:
tar xf node-v4.3.1-linux-x64.tar.xz
解压之后,把bin设置到path中:
# added by huangwei
PATH=$PATH:/home/whuang/software/node/node-v4.3.1-linux-x64/bin
(2)测试安装是否成功:
[root@iZ25tti3rxdZ bin]# ./node -v
v4.3.1
[root@iZ25tti3rxdZ bin]# ./npm -v
2.14.12
(3)安装lessc
npm install -g less
[root@iZ25tti3rxdZ chanjet]# npm install -g less
npm WARN deprecated graceful-fs@3.0.8: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible.
/home/whuang/software/node/node-v4.3.1-linux-x64/bin/lessc -> /home/whuang/software/node/node-v4.3.1-linux-x64/lib/node_modules/less/bin/lessc
less@2.6.0 /home/whuang/software/node/node-v4.3.1-linux-x64/lib/node_modules/less
├── mime@1.3.4
├── graceful-fs@3.0.8
├── image-size@0.3.5
├── mkdirp@0.5.1 (minimist@0.0.8)
├── promise@6.1.0 (asap@1.0.0)
├── errno@0.1.4 (prr@0.0.0)
├── source-map@0.4.4 (amdefine@1.0.0)
└── request@2.69.0 (aws-sign2@0.6.0, forever-agent@0.6.1, tunnel-agent@0.4.2, oauth-sign@0.8.1, is-typedarray@1.0.0, caseless@0.11.0, stringstream@0.0.5, isstream@0.1.2, json-stringify-safe@5.0.1, extend@3.0.0, tough-cookie@2.2.1, node-uuid@1.4.7, qs@6.0.2, combined-stream@1.0.5, form-data@1.0.0-rc3, mime-types@2.1.10, aws4@1.2.1, hawk@3.1.3, bl@1.0.3, har-validator@2.0.6, http-signature@1.1.1)