a question with PATH error

Hi,
I have a simple question when using openembedded to build the image for beagleboard follow the BeagleBoardAndOpenEmbeddedGit document
after type git pull I received this message:

OE:\MY_OE_CONF [\033[01;32m]OE:\MY_OE_CONF[\033[00m] ${PS1}git pull
Command ‘git’ is available in ‘/usr/bin/git’
The command could not be located because ‘/usr/bin’ is not included in the PATH environment variable.
bash: git: command not found

cause I am new with Linux so I would like to ask that if I should add the /usr/bin to the PATH variable?
Could you please tell me how to add it permanently?

Best regards,
Thang Nguyen

Hi,

it should be added to your path already I’m surprised that’s not the case.
Anyway you can add it.

I’m not a real expert for more info browse the web :wink:

good luck

Maxime

Hi Thang

cause I am new with Linux so I would like to ask that if I should add the /usr/bin to the PATH variable?
Could you please tell me how to add it permanently?

Yes it should be in your path… the question is why it isn’t. One possibility that occurs is that most of the OE HowTo guides suggest setting up a shell script to export some variables, including adding a local bitbake directory to the path. If you forgot to append or prepend the old PATH variable you’d end up with just bitbake on the path, which would make a mess of your shell.

Wrong:

export PATH="${OE_HOME}/bitbake/bin/"

Correct:

export PATH="${OE_HOME}/bitbake/bin/:${PATH}"

  • or -
    export PATH="${PATH}:${OE_HOME}/bitbake/bin/"

If it’s not that you can paper over the problem in your ~/.profile script by adding something like…

export PATH="/usr/bin:${PATH}"

…then relog. Type export on its own to see what’s in your path at the moment. It should have at least:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Regards

Rob

Hi,
I checked it. The path to usr/bin is actually in the PATH already. But after use the command source beagleboard/beagleboard/profile.sh
I go to another shell, and from this I use the git command and it doesn’t work:

OE:\MY_OE_CONF [\033[01;32m]OE:\MY_OE_CONF[\033[00m] ${PS1}git pull