Bye Bye Moore

猫マンション建築の野望を胸に零細事業主として資本主義の荒波に漕ぎ出したアラサー男の技術メモ

Go言語製アプリで"signal: killed"等々のエラーが出たら、とりあえず言語のアップデートをかけてみる

$ go run firmata_blink.go 
signal: killed

$ go version
go version go1.8 darwin/amd64

ここからダウンロード
Getting Started - The Go Programming Language

$ go version
go version go1.9 darwin/amd64

再実行すると、xcodeの実行権限つけろとか言われるので

$ go run examples/firmata_blink.go 
# github.com/tarm/serial


Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.


# github.com/raff/goble/xpc


Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
$ sudo xcodebuild -license
Password:

ライセンスよんで、OKなら"agree"と入力

はい、無事に動きました

$ go run examples/firmata_blink.go 
2017/10/01 13:22:54 Initializing connections...
2017/10/01 13:22:54 Initializing connection Firmata-41AD3F2C0A3122B4 ...
2017/10/01 13:22:54 Initializing devices...
2017/10/01 13:22:54 Initializing device LED-2518522497F97919 ...
2017/10/01 13:22:54 Robot bot initialized.
2017/10/01 13:22:54 Starting Robot bot ...
2017/10/01 13:22:54 Starting connections...
2017/10/01 13:22:54 Starting connection Firmata-41AD3F2C0A3122B4 on port /dev/tty.usbmodem1421...

やめるときはCtrl+C