I can't install golang on freebsd 12.2 (solved)

OP
hbsd

hbsd

Member

Reaction score: 9
Messages: 29

This tells me that either you forgot to source .profile after updating it or when you did "mv go /usr/local" something went wrong. That is why the next thing to try was to run /usr/local/go/bin/go directly. Anyway, good luck!
No I did that. anyway thank you for your help. thanks good luck to you...
 
OP
hbsd

hbsd

Member

Reaction score: 9
Messages: 29

My dear friends, I don't want this post to be longer than this.
I just really want to say thank you...
I don't want to bother you guys any more. You all are wonderful.
I forget about this for now. there are many languages and other cool stuff.
Thank you so much... Thank you for your time...
 
OP
hbsd

hbsd

Member

Reaction score: 9
Messages: 29

finally I find a way to run golang code.
I downloaded the golang manually and moved it to the local folder, and to execute golang code, I give the exact compiler address to the project location. Only this method worked!

/usr/local/go/bin/go run ~/projects/trygo/filename.go
 

rafael_grether

Member

Reaction score: 17
Messages: 32

hbsd, I don't know what happens.
But you can verify Go checksum:
$ cat /usr/ports/lang/go/distinfo
And compare with sha256 from go downloaded at /usr/ports/distfiles
$sha256 /usr/ports/distfiles/go_....tar.xz
It's supposed to be the same.

In this case, you can make with:
$ make NO_CHECKSUM=yes, to avoid this verify.
 

astyle

Daemon

Reaction score: 764
Messages: 1,645

I can suggest this for your system:
Code:
% su root
password:
# ln -s /usr/libexec/locate.updatedb /sbin/updatedb
# updatedb
# exit
# ln -s /usr/local/go/bin/go /usr/local/bin/go
% locate *.go | grep -v ports | less
The part done as root - that should help when looking for files on your system. One of the first chores I do on a brand-new install, and I run updatedb by hand when I need to find config files.
 

bakul

Active Member

Reaction score: 93
Messages: 164

hbsd was doing the right thing by adding $GOPATH/bin & $GOROOT/bin to PATH as these are the places where Go binaries go when you do go install …
 
Top