V
V
veieivtam2022-03-07 11:00:34
linux
veieivtam, 2022-03-07 11:00:34

Why won't go language run on ubuntu 20.4?

I am an absolute beginner on this wonderful operating system. I installed the go language compiler from the official site, unpacked the archive and /usr/local/then added the following lines to the .bashrc file:

#User Settings
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

Now, even after restarting the computer, on command go versionit gives me my version of the compiler.
But the command go rungives an error go run: no go files listed
6225baf5ca093844789530.png
. I did not find information on this error. How can I solve the problem and run the compiler?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
Roman Kitaev, 2022-03-07
@veieivtam

It's not a mistake. Open ANY tutorial on go, please

A
Alexander Karabanov, 2022-03-07
@karabanov

Go to the directory where the code is stored and run it there.

M
Michael, 2022-03-07
@Mikhail_RU

There are no *.go files in the folder, the compiler does not see them, there is nothing for it to compile

D
Dmitry, 2022-03-07
@Spargwy

Hmm
Only installing another system will help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question