亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

嘗試安裝時在 Mac OS X 中失敗

嘗試安裝時在 Mac OS X 中失敗

Go
慕娘9325324 2022-01-17 20:01:04
在 Mac OS X 上,嘗試go get執行以下命令。它因以下錯誤而失?。?jabongs-MacBook-Pro-4:florest debraj$ go get ./...go install github.com/jabong/florest/src/common/config: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build823644730/github.com/jabong/florest/src/common/config.a: no such file or directorygo install github.com/jabong/florest/src/common/utils/responseheaders: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build823644730/github.com/jabong/florest/src/common/utils/responseheaders.a: no such file or directorygo install github.com/jabong/florest/src/service: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build823644730/github.com/jabong/florest/src/service.a: no such file or directory以下是使用-x標志的輸出:-jabongs-MacBook-Pro-4:florest debraj$ go get -x ./...WORK=/var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build665863426mkdir -p $WORK/github.com/jabong/floRest/src/examples/_obj/mkdir -p $WORK/github.com/jabong/floRest/src/cd /Users/debraj/golang/src/github.com/jabong/floRest/src/examples/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/floRest/src/examples.a -trimpath $WORK -p github.com/jabong/floRest/src/examples -complete -buildid febe48d3c570d8539844891977fbdc206dc458b4 -D _/Users/debraj/golang/src/github.com/jabong/floRest/src/examples -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./api_definition.go ./data_structures.go ./hello_world.go ./hello_world_health_checker.go ./hello_world_multipe_errors.go ./swagger.gomkdir -p $WORK/github.com/jabong/floRest/src/service/_obj/mkdir -p $WORK/github.com/jabong/florest/src/examples/_obj/mkdir -p $WORK/github.com/jabong/florest/src/cd /Users/debraj/golang/src/github.com/jabong/floRest/src/service有人可以讓我知道為什么會出現這個錯誤嗎?這在 Ubuntu 上運行良好。
查看完整描述

1 回答

?
MMMHUHU

TA貢獻1834條經驗 獲得超8個贊

這個問題是在golang-nuts討論后發現的。只是在下面再次引用它:-

我的猜測是因為 Mac 文件系統保留大小寫但不區分大小寫,這意味著在 mac os 中“floRest”和“florest”是同一個文件/目錄,而在 linux 上它們是 2 個不同的文件。(您也可以將 mac 文件系統配置為區分大小寫,但這不是默認設置)。

正如您在日志中看到的:

mv $WORK/github.com/jabong/floRest/src/examples.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/floRest/src/examples.a

mkdir -p /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/

cp $WORK/github.com/jabong/florest/src/examples.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/examples.a

去安裝github.com/jabong/florest/src/examples:打開/var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build665863426/github.com/jabong/florest/src/examples.a:沒有這樣的文件或目錄

文件“floRest/src/examples.a”被移動,然后嘗試復制“florest/src/examples.a”,這是mac os上的同一個文件,它不再存在。

為了克隆我使用的 repo:-

git clone https://github.com/jabong/florest/

因此,在 mac 中,我的代碼在目錄中簽出florest。但是實際的倉庫名稱是https://github.com/jabong/floRest/并且在代碼中它被引用為floRest導致問題的原因。


查看完整回答
反對 回復 2022-01-17
  • 1 回答
  • 0 關注
  • 265 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號