我有一個本地開發服務器,在這裏我測試了很多東西,現在我正在使用鮑爾來管理我的Symfony2項目中庫的依賴關係。得到的NodeJS(v0.10.31)安裝和亭子(1.3.9)後,我試圖運行從控制檯屬於Symfony2的SpBowerBundle爲root
命令sp:bower:install
:從root用戶運行涼亭,有可能嗎?怎麼樣?
Symfony > sp:bower:install
Installing bower dependencies for "TemplateBundle" into "/var/www/html/tanane/src/Tanane/TemplateBundle/Resources/config/bower/../../public/components"
bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
http://www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option
我知道加入--allow-root
的作品,因爲我測試直接來自bash,但它顯然不允許從捆綁命令行。現在,運行涼亭的唯一方法是root
添加--allow-root
還是以另一種方式存在?
你在哪兒放allow_root:true? – Tyvain 2015-01-12 08:37:42
@Tyvain,我有同樣的問題。我在沒有Symfony的情況下在FreeBSD 10上安裝了Bower。鍵入:cd/Then ee .bowerrc。在那裏添加: { 「allow_root」:true }有關.bowerrc文件的更多信息,請參見http://bower.io/docs/config/。 – blablabla 2015-02-21 14:42:07
'allow_root'值必須在你的'app/config/config.yml'中設置。只需按照答案中的鏈接。 – althaus 2015-03-04 08:19:07