redhat or fedora or centos distribution you should
$ sudo yum install rubygems
$ sudo yum install gcc-c++
$ sudo yum install ruby-devel
$ sudo gem install less
$ sudo gem install therubyracer
$ lessc yourLessFile.less > yourCssFile.css
Mac, Linux and Windows compiler