简体   繁体   English

在我的bash中找不到PATH棱镜命令

[英]PATH prismic command not found in my bash

I am getting this : 我得到这个:

-bash: prismic: command not found

and when i tried to see and fix it i got this below PATH. 当我尝试查看并修复它时,我在PATH下面找到了它。 I want to change it but every time i do nothing change. 我想更改它,但是每次我什么都没有更改。

echo $PATH

/Users/myname/.rvm/gems/ruby-2.3.3/bin:/Users/myname/.rvm/gems/ruby-2.3.3@global/bin:/Users/myname/.rvm/rubies/ruby-2.3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/myname/.rvm/bin

I tried to use export using these commands : 我试图通过以下命令使用export:

export PATH="/usr/bin:/bin:/usr/sbin:/sbin"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"

But nothing change. 但是什么都没有改变。 I am tying install Prismic using this command: 我使用以下命令捆绑安装Prismic:

npm install -g prismic-cli

it work then i try to use this command : 它工作,然后我尝试使用此命令:

prismic init whatevername

I get this error every time 我每次都会收到此错误

-bash: prismic: command not found

Clearly the binary for prismic is not in your path. 显然, prismic形的二进制文件不在您的路径中。

First find out where it is: 首先找出它在哪里:

sudo updatedb
locate prismic

Then add that directory to your PATH. 然后将该目录添加到您的PATH中。

As @Bruno9779 says the binary has not been found in any directory on your PATH. 正如@ Bruno9779所说,在您的PATH的任何目录中都找不到二进制文件。 What you need to do is find the residing directory of the "primsic" binary and add it to your PATH. 您需要做的是找到“原始”二进制文件的驻留目录,并将其添加到您的PATH中。 To find the binary you can use any search tool. 要查找二进制文件,可以使用任何搜索工具。 Bruno mentions locate but you could also use find: Bruno提到了locate,但是您也可以使用find:

find / -type f -name "prismic"

Once you have found the directory containing the "prismic" file you need to add it to your PATH using the export command: 找到包含“原始”文件的目录后,需要使用导出命令将其添加到PATH中:

export PATH=/some/directory/bin:$PATH

where you obviously substitute "/some/directory/bin" with the path to the directory containing the "prismic" file. 您显然在其中用包含“原始”文件的目录路径替换“ / some / directory / bin”。

EDIT 15:01 GMT 30/01/2017: 编辑15:01 GMT 30/01/2017:

Prismic installs it's binaries into the 'node_modules/.bin' directory therefore Hesham was adding the wrong directory to his path and hence the command was not being found. Prismic将其二进制文件安装到“ node_modules / .bin”目录中,因此Hesham在路径中添加了错误的目录,因此未找到该命令。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM