Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

You can install less css compiler easy:

apt-get install lessc

But that only installs version 1.1.0. How can you update to the very latest version?

(The latest version is 1.3.0)

-- update --

  • I want to use the lessc command-line tool, not the client-side implentation.
share|improve this question

5 Answers 5

up vote 7 down vote accepted

Are you using it client-side (in the browser)? If so, it's a single JavaScript file, just download it.

If you're using it server-side (from a NodeJS application), or want the lessc command-line tool, the recommended way to install is using npm (the Node Package Manager):

npm install less

If you don't have npm, it's in the Ubuntu 11.10 repositories:

sudo apt-get install npm

or Using Software Center Install npm via the software center

share|improve this answer
1  
I'm using the command line tool. Too bad it can't simply be installed via apt-get, but npm worked. I did get 2 warnings npm WARN publish-everything less@1.3.0 Adding entire directory to tarball. Please add a and npm WARN publish-everything less@1.3.0 .npmignore or specify a 'files' array in the package.json –  BullfrogBlues Apr 7 '12 at 10:17
    
npm is warning you that less doesn't specify which files to package up when installing the package. You might want to file a bug report with the developers, but it should be harmless. –  Søren Løvborg Apr 7 '12 at 14:13

After a lot of head-hitting-desk moments I managed to solve this one.

Originally I had installed lessc using:

sudo apt-get install node-less yui-compressor

This gave me lessc 1.2.1 from the command lessc -v

Had to manually download the Quantal version from a repo http://www.ubuntuupdates.org/pm/node-less

(this gave me ~/Downloads/node-less_1.3.0~20120310-1_all.deb)

Then:

sudo dpkg -i ~/Downloads/node-less_1.3.0~20120310-1_all.deb

now I have lessc 1.3.0

and:

lessc twit-bootstrap_2.0/less/bootstrap.less > /var/tmp/bs.css

goes smoothly

share|improve this answer

That is because, it is the latest version available in repositories

http://packages.ubuntu.com/search?suite=all&section=all&arch=any&searchon=names&keywords=node-less

Whatever version is present in repositories you have added, apt-get will install only that version.

However if you want to install different version, you should try for other ways

share|improve this answer

As of Ubuntu 12.10, the node-less package installs v1.3.0 of lessc:

$ sudo apt-get install node-less
...
$ lessc -v
lessc 1.3.0 (LESS Compiler) [JavaScript]
share|improve this answer

Just :

npm install less -g

or with sudo

sudo npm install less -g

For checking version :

lessc -v
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.