Macos 使用bower安装引导程序4
我正试图在mac上使用我的终端。我成功地安装了Macos 使用bower安装引导程序4,macos,bash,shell,terminal,bower,Macos,Bash,Shell,Terminal,Bower,我正试图在mac上使用我的终端。我成功地安装了npm,当我键入npm--version时,它会给出2.14.12。有了npm,我安装了bower,我认为它可以工作。但我有两个问题: 当我键入bower-v时,它会给出以下信息: /usr/local/lib/node_modules/bower/node_modules/configstore/index.js:56 throw err; ^ Error: EACCES: permission denied,
npm
,当我键入npm--version
时,它会给出2.14.12
。有了npm,我安装了bower,我认为它可以工作。但我有两个问题:
bower-v
时,它会给出以下信息:
/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:56
throw err;
^
Error: EACCES: permission denied, open '/Users/philip/.config/configstore/bower- github.yml'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (evalmachine.<anonymous>:549:18)
at Object.fs.readFileSync (evalmachine.<anonymous>:397:15)
at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:34:29)
at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:27:44)
at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:56
throw err;
^
at Error (native)
at Object.fs.openSync (evalmachine.<anonymous>:549:18)
at Object.fs.readFileSync (evalmachine.<anonymous>:397:15)
at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:34:29)
at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/configstore/index.js:27:44)
at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
您得到EACCESS错误的原因是因为您没有访问这些文件的权限 要检查文件/目录的当前权限,请运行:
ls-l
在终端提示下
您将看到类似以下内容的输出:
drwxr--r--1所有者组…
对于每个列表
该输出的第一个字符表示文件类型。在示例中,“d”表示列出的文件是一个目录。第二组三个字符描述文件所有者的读取('r')、写入('w')和执行('x')权限
接下来的三个字符描述文件所属组的权限。在本例中,您可以看到“r--”。这意味着该文件所属的组仅具有读取该文件的权限,而没有写入(如“-”所示)或执行该文件的权限
最后三个字符描述了“所有用户”的权限。在本例中,“r--”表示所有用户对该文件都具有只读访问权限
此资源将帮助您了解*nix/OS X文件权限:
为了在不使用sudo的情况下运行这些命令,您将更改当前权限设置,以允许自己对引发EACCESS错误的文件进行读/写访问。这可以通过GUI或终端上的chmod命令来完成
在终端上运行
manchmod
,将打开chmod命令的手册页() 好的,谢谢!但我是我的系统的根用户。或者我不是?您建议如何安装引导程序?我可以更改权限吗?因为我不能与鲍尔一起使用sudo
。这就是它所说的命令whoami
将显示您当前登录的用户。我将调查引发错误的.yml文件的权限。从那里您可以:编辑该文件的权限以便访问它,递归编辑包含文件夹的权限以便可以访问其中的所有内容,或者使用chown命令将用户更改为包含文件.yml文件的文件夹的所有者。我不熟悉bower,但这似乎更像是一个一般权限问题。好的,我已经设置了权限。我编辑了我的帖子。显然我遇到了一个新问题
Philips-MacBook-Pro:test philip$ bower install bootstrap
bower bootstrap#* not-cached git://github.com/twbs/bootstrap.git#*
bower bootstrap#* resolve git://github.com/twbs/bootstrap.git#*
bower bootstrap#* ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/twbs/bootstrap.git", exit code of #69 Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Additional error details:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.