2016-06-21 2 views
0

Mac OS Xの場合、以下のコマンドを実行してgo getを実行しようとしています。それは以下のエラーで失敗している: - 以下をインストールしようとしているときにMac OS Xで失敗する

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 directory 
go 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 directory 
go 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-build665863426 
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/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.go 
mkdir -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 
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/floRest/src/service.a -trimpath $WORK -p github.com/jabong/floRest/src/service -complete -buildid f55b565340e2d0d690f5de8bd424fffb8895a331 -D _/Users/debraj/golang/src/github.com/jabong/floRest/src/service -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./api_interface.go ./business_logic_executor.go ./config_manager.go ./constants.go ./dynamic_config_manager.go ./health_checker.go ./http_response_creator.go ./init_manager.go ./monitor_helper.go ./service_register.go ./service_version_helper.go ./service_workflow_data.go ./uri_interpreter.go ./web_server.go 
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.go 
mkdir -p $WORK/github.com/jabong/florest/src/examples/cachestrategy/_obj/ 
mkdir -p $WORK/github.com/jabong/florest/src/examples/ 
cd /Users/debraj/golang/src/github.com/jabong/florest/src/examples/cachestrategy 
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/florest/src/examples/cachestrategy.a -trimpath $WORK -p github.com/jabong/florest/src/examples/cachestrategy -complete -buildid c16efba4536c81f8b5b9f0090f909c0b3c71383c -D _/Users/debraj/golang/src/github.com/jabong/florest/src/examples/cachestrategy -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./api_definition.go ./cache_strategy_user.go ./sample_db_adapter.go 
mkdir -p $WORK/github.com/jabong/florest/src/service/_obj/ 
cd /Users/debraj/golang/src/github.com/jabong/florest/src/service 
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/florest/src/service.a -trimpath $WORK -p github.com/jabong/florest/src/service -complete -buildid f55b565340e2d0d690f5de8bd424fffb8895a331 -D _/Users/debraj/golang/src/github.com/jabong/florest/src/service -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./api_interface.go ./business_logic_executor.go ./config_manager.go ./constants.go ./dynamic_config_manager.go ./health_checker.go ./http_response_creator.go ./init_manager.go ./monitor_helper.go ./service_register.go ./service_version_helper.go ./service_workflow_data.go ./uri_interpreter.go ./web_server.go 
mkdir -p /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/floRest/src/ 
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 
go install github.com/jabong/florest/src/examples: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build665863426/github.com/jabong/florest/src/examples.a: no such file or directory 
mkdir -p /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/examples/ 
mv $WORK/github.com/jabong/florest/src/examples/cachestrategy.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/examples/cachestrategy.a 
mv $WORK/github.com/jabong/floRest/src/service.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/floRest/src/service.a 
mkdir -p $WORK/github.com/jabong/florest/_obj/ 
mkdir -p $WORK/github.com/jabong/florest/_obj/exe/ 
cd /Users/debraj/golang/src/github.com/jabong/florest 
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/florest.a -trimpath $WORK -p main -complete -buildid fb73c44c8d0536fc3134f24ae052fdb67036f537 -D _/Users/debraj/golang/src/github.com/jabong/florest -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./main.go 
mkdir -p $WORK/github.com/jabong/florest/src/test/servicetest/_obj/ 
mkdir -p $WORK/github.com/jabong/florest/src/test/ 
cd /Users/debraj/golang/src/github.com/jabong/florest/src/test/servicetest 
/usr/local/go/pkg/tool/darwin_amd64/compile -o $WORK/github.com/jabong/florest/src/test/servicetest.a -trimpath $WORK -p github.com/jabong/florest/src/test/servicetest -complete -buildid 9936e7e44a8331913a166a228aa8e088d0b05adf -D _/Users/debraj/golang/src/github.com/jabong/florest/src/test/servicetest -I $WORK -I /Users/debraj/golang/pkg/darwin_amd64 -pack ./config_initialize.go ./logger_initialize.go ./service_initialize.go ./service_test_helper.go ./test_web_server.go 
cp $WORK/github.com/jabong/florest/src/service.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/service.a 
go install github.com/jabong/florest/src/service: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build665863426/github.com/jabong/florest/src/service.a: no such file or directory 
cd . 
/usr/local/go/pkg/tool/darwin_amd64/link -o $WORK/github.com/jabong/florest/_obj/exe/a.out -L $WORK -L /Users/debraj/golang/pkg/darwin_amd64 -extld=clang -buildmode=exe -buildid=fb73c44c8d0536fc3134f24ae052fdb67036f537 $WORK/github.com/jabong/florest.a 
mkdir -p /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/test/ 
mv $WORK/github.com/jabong/florest/src/test/servicetest.a /Users/debraj/golang/pkg/darwin_amd64/github.com/jabong/florest/src/test/servicetest.a 
mkdir -p /Users/debraj/golang/bin/ 
mv $WORK/github.com/jabong/florest/_obj/exe/a.out /Users/debraj/golang/bin/florest 

誰かがこのエラーが来ている理由は、私が知っていることはできますか?これはUbuntu上で完璧に動作しています。

バージョン

  • のMacOS X - 10.11.4
  • GoLang - 1.6.1
+1

リポジトリが公開されていないため何が問題なのかわかりにくいので、デバッグしようとすると、最高の状態になるはずです。 – Art

+0

'open/var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build823644730/github.com/jabong/florest/src/common/config.a'をしようとしていますか?私はこのフォルダ構造を 'GOROOT'でも' GOPATH'でも指定していません – tuk

+0

これは一時ファイルです。 – Art

答えて

0

問題がgolang-nutsで議論した後に発見されました。ただ、もう一度、以下のことを引用: -

My guess is that's because Mac filesystem is case preserving but not case-sensitive, meaning that in mac os "floRest" and "florest" is the same file/directory while on linux those are 2 distinct files. (you can configure mac filesystem to be case-sensitive as well, but that's not the default).

As you can see in the logs:

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

go install github.com/jabong/florest/src/examples: open /var/folders/lp/3q9_2mn51hd9s4yj_jcf3jxm0000gp/T/go-build665863426/github.com/jabong/florest/src/examples.a: no such file or directory

a file "floRest/src/examples.a" is moved and then there's an attempt to copy "florest/src/examples.a", which is the same file on mac os, and it's no longer there.

を私が使用レポのクローンを作成するために: -

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

だからマックに私のコードは、ディレクトリflorestでチェックアウト。しかし、実際のレポ名はhttps://github.com/jabong/floRest/であり、コードではfloRestと表示されていましたが、この問題が原因でした。

関連する問題