Go : インストール2021/04/12 |
|
Go をインストールします。
|
|
| [1] | 現在、有効になっている Go のストリームを確認してインストールします。 |
|
[root@dlp ~]# dnf module list go-toolset CentOS Stream 8 - AppStream Name Stream Profiles Summary go-toolset rhel8 [d] common [d] Go Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # Go インストール [root@dlp ~]# dnf module -y install go-toolset:rhel8
Dependencies resolved.
================================================================================
Package Arch Version Repository
Size
================================================================================
Installing group/module packages:
go-toolset x86_64 1.11.6-1.module_el8.0.0+192+8b12aa21 AppStream 11 k
Installing dependencies:
golang x86_64 1.11.6-1.module_el8.0.0+192+8b12aa21 AppStream 637 k
golang-bin x86_64 1.11.6-1.module_el8.0.0+192+8b12aa21 AppStream 110 M
golang-src noarch 1.11.6-1.module_el8.0.0+192+8b12aa21 AppStream 6.4 M
keyutils-libs-devel
x86_64 1.5.10-6.el8 BaseOS 48 k
krb5-devel x86_64 1.16.1-22.el8 BaseOS 546 k
libcom_err-devel x86_64 1.44.3-2.el8 BaseOS 37 k
libkadm5 x86_64 1.16.1-22.el8 BaseOS 184 k
libselinux-devel x86_64 2.8-6.el8 BaseOS 199 k
libsepol-devel x86_64 2.8-2.el8 BaseOS 85 k
libverto-devel x86_64 0.3.0-5.el8 BaseOS 18 k
openssl-devel x86_64 1:1.1.1-8.el8 BaseOS 2.3 M
pcre2-devel x86_64 10.32-1.el8 BaseOS 605 k
pcre2-utf16 x86_64 10.32-1.el8 BaseOS 228 k
pcre2-utf32 x86_64 10.32-1.el8 BaseOS 220 k
zlib-devel x86_64 1.2.11-10.el8 BaseOS 56 k
Installing module profiles:
go-toolset/common
Enabling module streams:
go-toolset rhel8
Transaction Summary
================================================================================
Install 16 Packages
.....
.....
[root@dlp ~]#
go version go version go1.16.1 linux/amd64 # テストプログラムを作成して動作確認
[root@dlp ~]# cat > helloworld.go <<'EOF'
package main
import "fmt"
func main() {
fmt.Println("Hello Go World !")
}
EOF
[root@dlp ~]#
go run helloworld.go Hello Go World ! # ビルドして実行 [root@dlp ~]# go build helloworld.go [root@dlp ~]# ./helloworld Hello Go World ! |
| Sponsored Link |
|
|