W
W
wors13372015-12-20 09:42:01
go
wors1337, 2015-12-20 09:42:01

What is the correct way to download packages for Go?

When trying to download packages and import them, errors appear.
Variables PATH,GOPATH,GOROOT are set.
895514a1a3684e9fb44f824c2cb6592e.png1045482f79224a27a1881e6b6d60afd8.pngc2743b586ea846bca89bb4c732f81efd.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Shevelev, 2015-12-20
@mantyr

Make pkg-config the standard installer on your operating system.
In Gentoo, this is done like this:

# emerge -pv pkg-config

Calculating dependencies... done!
[ebuild  N     ] dev-libs/libyaml-0.1.6  USE="-doc -examples -static-libs {-test}" 492 kB
[ebuild  N     ] app-eselect/eselect-ruby-20131227  2 kB
[ebuild  N     ] dev-util/ragel-6.7-r1  USE="-vim-syntax" 1,156 kB
[ebuild  N     ] dev-lang/ruby-2.0.0_p647-r1:2.0  USE="berkdb gdbm ipv6 ncurses rdoc readline ssl -debug -doc -examples -rubytests -socks5 -xemacs" CPU_FLAGS_X86="sse2" 8,110 kB
[ebuild  N     ] dev-lang/ruby-2.1.7:2.1  USE="berkdb gdbm ipv6 ncurses rdoc readline ssl -debug -doc -examples -rubytests -socks5 -xemacs" 9,154 kB
[ebuild  N     ] dev-ruby/rubygems-2.2.5-r1  USE="-server {-test}" RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 408 kB
[ebuild  N     ] virtual/rubygems-10  RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 0 kB
[ebuild  N     ] dev-ruby/rake-0.9.6-r1  USE="-doc {-test}" RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 121 kB
[ebuild  N     ] dev-ruby/json-1.8.2-r1  USE="-doc {-test}" RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 149 kB
[ebuild  N     ] dev-ruby/racc-1.4.11  USE="-doc {-test}" RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 111 kB
[ebuild  N     ] dev-ruby/rdoc-4.0.1-r2  USE="-doc {-test}" RUBY_TARGETS="ruby20 ruby21 (-ruby19)" 457 kB
[ebuild  N     ] dev-ruby/pkg-config-1.1.5  USE="{-test}" RUBY_TARGETS="ruby20 (-ruby19)" 19 kB

Total: 12 packages (12 new), Size of downloads: 20,175 kB

In other linux operating systems,
and so on ...
But the main thing is to learn how to read what the computer writes to you in case of problems.
It reads like this:
If it is not found, then it must be installed. This is a well-known assembler program for some software.
The reason why the Golang library suddenly wanted this is the internal binding in it or in some other one that it uses and which has not yet been installed on your computer. Read about bindings (gluing Golang and C libraries) separately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question