本文介绍了lessc:找不到命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是OS X.8,并且是Node&的新手.较少的.我以为我早些时候安装了lessc,当我进入/usr/local/bin时,我看到了lessc

I'm on OS X.8 and a newbie at Node & LESS. I thought I installed lessc earlier and when I go to /usr/local/bin I see lessc

但是为了我的一生,我无法运行它.每当我运行它时,我都会看到-bash:lessc:找不到命令

but for the life of me, I can't run it. Anytime I do run it, I see-bash: lessc: command not found

所以我在此处具有以下内容:

So I've tried the tip here which has the following:

ln -s ~/.npm/less/1.3.3/package/bin/lessc my/local/dir

我的本​​地目录恰好在笔记本电脑的第二个驱动器上,这是路径:/Volumes/Mac17/Users/denis2/Sites/staging/assets/less

My local dir happens to be on a second drive on my laptop, here's the path:/Volumes/Mac17/Users/denis2/Sites/staging/assets/less

话虽如此,我尝试运行:

With all that said, I try and run:

lessc boostrap.less

并仍然获得

-bash: lessc: command not found

我在这里完全迷路了,任何帮助将是巨大的.

推荐答案

只需执行以下步骤:

  1. 让用户执行lessc可执行文件(拒绝权限表示您没有运行权限),例如chmod 755 lessc
  2. 将lessc的位置导出到PATH中,例如export PATH=$PATH:/home/user/folder/path/less/bin(其中存在lessc)
  3. 使用lessc lessc boostrap.less
  1. Make lessc executable by your user(permission denied means you dont have permission to run) like chmod 755 lessc
  2. Export the location of lessc into the PATH like export PATH=$PATH:/home/user/folder/path/less/bin (where lessc is present)
  3. Use lessc lessc boostrap.less

您应该将PATH导出置于环境中,这样就不必在每次登录时都这样做.请参见此处:在OS X中设置环境变量?

You should put PATH export in environment so that you dont have to do it every time you login See here :Setting environment variables in OS X?

这篇关于lessc:找不到命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 13:23