andeya / pholcus

Pholcus is a distributed high-concurrency crawler software written in pure golang
Apache License 2.0
7.58k stars 1.7k forks source link

go get github.com/henrylee2cn/pholcus 的时候报错了 #112

Closed WhV5 closed 5 years ago

WhV5 commented 5 years ago

github.com/henrylee2cn/pholcus

C:\Go\pkg\tool\windows_amd64\link.exe: running gcc failed: exit status 1 c:/mingw/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.2/../../../../x86_64-w64-mingw32/bin/ld.exe: i386 architecture of input file `C:\Users\henry\AppData\Local\Temp\go-link-908393803\000000.o' is incompatible with i386:x86-64 output collect2.exe: error: ld returned 1 exit status

这个是报错的文本信息,请问这个是什么错误呢

flinus552 commented 5 years ago

go install -ldflags="-H windowsgui"

vulcangz commented 5 years ago

Maybe you can try:

λ go install -ldflags "-linkmode=internal"
presoulgo commented 5 years ago

same error

andeya commented 5 years ago

gcc 版本和go不批的问题,解决办法:

  1. 移除GUI
  2. 尝试其他gcc版本
chenxun450 commented 5 years ago

Maybe you can try:

λ go install -ldflags "-linkmode=internal"

Maybe you can try:

λ go install -ldflags "-linkmode=internal"

用这个可行。我的gcc是msys2中的 9.2版本