Ubuntu 10 x下安裝go語言開發環境

2021-05-23 13:31:42 字數 889 閱讀 2885

1.安裝go語言源**管理工具mercurial

3.編譯go語言

cd go/src

./all.bash

如果安裝過程中出現:

bison not found.

請使用sudo apt-get install bison 命令安裝bison.

bison用於語法分析器的自動生成。

4.裝go語言目錄複製到opt目錄下

sudo cp -r go /opt/go

5.為所有使用者提交go語言的執行許可權

cd /opt/go

sudo chmod a+x *

6.設定go語言環境變數

sudo gedit /etc/profile

export goroot=/opt/go

export goarch=386

export goos=linux

export path=$goroot/bin:$path

$goarch為目標的版本,有amd64/386/arm可供選擇。

7.還是hello world,(hello.go)

package main

import "fmt"

func main()

8.編譯,鏈結,執行

8g hello.go

8l -o hello hello.8

./hello

DB2 v9 5在Ubuntu10 x下安裝

以前用的是ubuntu9.0.4,裝db2 v9.5非常輕鬆,一路下去,什麼問題也沒有。這次情況不妙,ubuntu公升級到10.04以後,缺了libstdc so.5,系統中只有.so.6,使用apt get intall libstdc 5,也找不到安裝包。無奈,只能在網上苦苦搜尋,找了半天也沒找...

ubuntu16 04 apt方式安裝go語言環境

環境 ubuntu16.04 不知道為什麼網上那麼多ubuntu版的apt安裝go語言的教程到我這裡就都不能用,索性find name go 自己找一下goroot,結果發現在goroot實際上應該設定為 usr lib go 1.6,而安裝時預設的goroot設定在了 go,所以不能用,寫下來以後...

Ubuntu下安裝Go語言

linux 安裝 假定你想要安裝go的目錄為 go install dir,後面替換為相應的目錄路徑。解壓縮tar.gz包到安裝目錄下 tar zxvf go1.9.2.linux amd64.tar.gz c go install dir。比如我要安裝的絕對路徑是 root hailin 解壓完成...