91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

go語言中的常見錯誤和解決方法

發布時間:2020-06-19 12:57:21 來源:億速云 閱讀:773 作者:鴿子 欄目:編程語言

本文是基于mac,安裝go1.14版本之后,執行一個基本的go文件報錯了。

錯誤現象:

執行下面的go的文件報下面的錯誤了

# hello.go
package main

import "fmt"

func main(){
    fmt.Println("hello world")
}

運行效果如下:

?  test go run hello.go
# runtime/internal/atomic
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:13:6: Load redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:16:24
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:19:6: Loadp redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:22:32
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:25:6: Load64 redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:28:26
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:31:6: LoadAcq redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:34:27
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:36:6: Xadd redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:39:37
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:39:6: Xadd64 redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:42:39
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:42:6: Xadduintptr redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:45:47
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:45:6: Xchg redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:48:36
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:48:6: Xchg64 redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:51:38
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:51:6: Xchguintptr redeclared in this block
    previous declaration at /usr/local/go/src/runtime/internal/atomic/atomic_amd64.go:54:45
/usr/local/go/src/runtime/internal/atomic/atomic_amd64x.go:51:6: too many errors

原因:

由于安裝新版本的時候,沒有刪除舊版本,導致安裝包的有些關聯發生錯誤

解決方案:

先手動刪除之前安裝的包,再重新按照

rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.14.1.darwin-amd64.tar.gz

以上就是go語言中一種常見的錯誤的詳細內容,更多請關注億速云其它相關文章!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

奉新县| 兴国县| 沅江市| 大渡口区| 肇东市| 湖南省| 北安市| 托里县| 昆明市| 彭州市| 陈巴尔虎旗| 遂宁市| 三门县| 丹寨县| 交口县| 邛崃市| 阜平县| 浙江省| 始兴县| 航空| 新泰市| 出国| 阿拉善盟| 青神县| 若尔盖县| 成安县| 侯马市| 西乌珠穆沁旗| 水城县| 丹巴县| 大英县| 东明县| 垣曲县| 西宁市| 开封县| 鄂伦春自治旗| 临江市| 玉龙| 高青县| 双柏县| 常州市|