當我運行 GoLang 程序時,它向我拋出此異常:packages/go-lang/1.3/pkg/tool/linux_amd64/6l: readsym out of sync它是否來自我的amd64,它不會被 resize 模塊支持?代碼塊:package mainimport ( "fmt" "github.com/nfnt/resize" "image/jpeg" "log" "os")func main() { //Open fmt.Printf("Open data2\n") file, err := os.Open("data2.png") check(err) // decode jpeg into image.Image fmt.Printf("Decode file\n") img, err := jpeg.Decode(file) check(err) file.Close() // resize to width 1000 using Lanczos resampling // and preserve aspect ratio resize.Resize(1000, 0, img, resize.Lanczos3)}func check(e error) { if e != nil { log.Fatal(e) }}我的操作系統:Linux chamber-tommy 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux刪除該行resize.Resize(1000, 0, img, resize.Lanczos3)及其導入以及變量 img 后。它運行良好。但是,當我執行 ago test并go build在$GOPATH/src/github.com/nfnt/resize其中起作用時,我的提示是:PASS ok github.com/nfnt/resize 0.029s另一個信息是,我在較舊的簽入時收到相同的錯誤消息,例如: git checkout 8aee0d995b6
- 1 回答
- 0 關注
- 226 瀏覽
添加回答
舉報
0/150
提交
取消