“Please try running this command again as Root/Administrator” error when trying to install LESS

后端 未结 11 2019
栀梦
栀梦 2020-12-02 14:09

I\'m trying to install LESS on my machine and have installed node already. However, when I enter \"node install -g less\" I get the following error and am not sure what to d

11条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-02 14:46

    Re Explosion Pills "An installation can run arbitrary scripts and running it with sudo can be extremely dangerous!"

    Seems like using sudo is the wrong way of doing it.

    "Change the owner of the files in your /usr/local folder to the current user:"

    sudo chown -R $USER /usr/local
    

    Then run the install

    node install -g less
    

    Check out:

    • npm throws error without sudo
    • https://aralbalkan.com/scribbles/npm-install-g-please-try-running-this-command-again-as-root-administrator/
    • http://foohack.com/2010/08/intro-to-npm/#what_no_sudo

提交回复
热议问题