$PATH not found

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
devildog
Posts: 25
Joined: Thu Jul 08, 2021 11:28 am
Has thanked: 9 times
Been thanked: 2 times

$PATH not found

Post by devildog »

Hi Guys ...

Am trying to set up "go" which needs a path set to /usr/local/go

Here is the output of $PATH (pictured) on a clean (no savefile) boot...

# $PATH
sh: /usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/qt5/bin: No such file or directory
#

^^ is this caused by the trailing " : " after the qt5/bin ? or is there something I'm missing?

pathprobs901.jpg
pathprobs901.jpg (22.09 KiB) Viewed 830 times

PS thanks for posting compiz sfs - really cant live without it !

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 375 times
Been thanked: 1314 times
Contact:

Re: $PATH not found

Post by fredx181 »

To show the PATH, run: echo $PATH

devildog
Posts: 25
Joined: Thu Jul 08, 2021 11:28 am
Has thanked: 9 times
Been thanked: 2 times

Re: $PATH not found

Post by devildog »

Thanks Fred - learn something every day!

So... to add GO to my path ... edit /etc/profile and modify the standard path line?

# standard path
PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/go/bin"

^^ This does seem to work...

# echo $PATH
/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/go/bin:/opt/qt5/bin
#

# whereis go
go: /usr/local/go /usr/local/go/bin/go
#

vv Ha! We posted at the same time.

Yes I see it - an export will work without the mod to /etc/profile

# go version
go version go1.22.3 linux/amd64
#

Last edited by devildog on Thu May 16, 2024 4:20 pm, edited 2 times in total.
User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 375 times
Been thanked: 1314 times
Contact:

Re: $PATH not found

Post by fredx181 »

devildog wrote: Thu May 16, 2024 3:54 pm

Thanks Fred - learn something every day!

So... to add GO to my path ... edit /etc/profile and modify the standard path line?

# standard path
PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/go/bin"

I'm not sure, perhaps sufficient to run first with export; export PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/go/bin:$PATH"
(if the go binary is in reality located in /usr/local/go/bin/)
And then staying in the same terminal do the required go commands.

User avatar
fredx181
Posts: 3085
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 375 times
Been thanked: 1314 times
Contact:

Re: $PATH not found

Post by fredx181 »

@devildog Probably you need also to set GOPATH variable : https://go.dev/wiki/GOPATH#gopath-variable

Post Reply

Return to “FatDog”