有人熟悉 etcd 項目嗎?或者我們在談論這個問題時最好忘記這個項目。問題是$ buildln: `gopath/src/github.com/coreos/etcd': cannot overwrite directory當 exec構建外殼和內容是:#!/bin/sh -eif [ ! -h gopath/src/github.com/coreos/etcd ]; then mkdir -p gopath/src/github.com/coreos/ ln -s ../../../.. gopath/src/github.com/coreos/etcdfiexport GOBIN=${PWD}/binexport GOPATH=${PWD}/gopathexport GOFMTPATH="./bench ./config ./discovery ./etcd ./error ./http ./log main.go ./metrics ./mod ./server ./store ./tests"# Don't surprise user by formatting their codes by stealthif [ "--fmt" = "$1" ]; then gofmt -s -w -l $GOFMTPATHfigo install github.com/coreos/etcdgo install github.com/coreos/etcd/bench一些補充:我的系統是 Windows 7我在 git bash 上運行 shell。 問題重現:step1: open the git bashstep2: git clone [email protected]:coreos/etcd.gitstep3: cd etcdstep4: build
3 回答

躍然一笑
TA貢獻1826條經驗 獲得超6個贊
如“ Git Bash Shell 無法創建符號鏈接”中所述(因為您在 Windows 7 上的 git bash 中使用該腳本)
在
ln
與msysGit運只是試圖復制它的參數,而不是鏈接小提琴。這是因為鏈接只在(某種程度上)在 NTFS 文件系統上工作,并且 MSYS 團隊不想重新實現 ln。解決方法是
mklink
從 Bash運行。
這也允許您創建Symlink 或 Junction。
因此,默認情況下,'ln' 在 Windows 版 Git 隨附的舊 shell 中不會按預期工作。
- 3 回答
- 0 關注
- 309 瀏覽
添加回答
舉報
0/150
提交
取消