2
raco pkg install iracket
-bash: raco: command not found

I add path to .bash_profile

# Setting PATH for Racket 7.0
export PATH="/Applications/Racket v7.0/bin/raco:$PATH"

But it still doesn't work. How can I fix it? Should I add path to .bash_profile or somewhere else? It is macOS.

export PATH="/Applications/Racket v7.0/bin:$PATH"

This doesn't work also.

user8314628
  • 1,952
  • 2
  • 22
  • 46
  • `PATH` should include directories, not individual executable files (which I suspect `/Applications/Racket v7.0/bin/raco` is). Try putting just `/Applications/Racket v7.0/bin` in `PATH` (without `/raco`). – Amadan Oct 22 '18 at 04:10
  • Still doesn't work. – user8314628 Oct 22 '18 at 04:14
  • 2
    1) Confirm the existence and location of the executable: `ls -l "/Applications/Racket v7.0/bin/raco"`. 2) Confirm that you have reloaded `.bash_profile`: `echo $PATH`. – Amadan Oct 22 '18 at 04:16
  • Ahhhh, sry, I didn't reload. – user8314628 Oct 22 '18 at 04:18

1 Answers1

1

Did you sourced the file?

source ~/.bash_profile

It's needed to update your environment variables.

Bsquare ℬℬ
  • 4,423
  • 11
  • 24
  • 44
  • Yea, that's the problem. Amadan mentioned it in the comment. Is `.bash_profile` doing the same thing? – user8314628 Oct 22 '18 at 08:22
  • Not exactly, because it will only be effective in the parent process' environment (the shell itself), and thus won't be inherited by all child process (e.g. launched instructions). – Bsquare ℬℬ Oct 22 '18 at 09:00