We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
由于外网被强了,因此克隆后直接使用,但是出现了如下错误: /tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘bridge_iconv’中: util/iconv/iconv.go:16:对‘libiconv’未定义的引用 /tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_C2func_iconv_close’中: util/iconv/iconv.go:88:对‘libiconv_close’未定义的引用 /tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_C2func_iconv_open’中: util/iconv/iconv.go:110:对‘libiconv_open’未定义的引用 /tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_Cfunc_iconv_close’中: util/iconv/iconv.go:163:对‘libiconv_close’未定义的引用 /tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_Cfunc_iconv_open’中: util/iconv/iconv.go:181:对‘libiconv_open’未定义的引用 collect2: 错误:ld 返回 1
感觉像是动态库找不到的问题,我发现自己的libconv.so在/usr/local/lib目录下,然后我有专门在/etc/ld.so.conf.d/ 添加了一条记录,ldconfig 之后 重新编译还是失败。
应该怎么做呢?(;′⌒`)
The text was updated successfully, but these errors were encountered:
在iconv.go 里面,你看下,加上 // #cgo linux LDFLAGS: -liconv 这句话,估计漏写了。
Sorry, something went wrong.
在官方的docker(From golang:1.10-alpine)里面跑不起来,尝试了安装apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted gnu-libiconv也不行 有朋友知道怎么解决吗?
apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted gnu-libiconv
报错信息如下:
# gopkg.in/iconv.v1 ../gopkg.in/iconv.v1/iconv.go:10:20: fatal error: iconv.h: No such file or directory // #include <iconv.h> ^ compilation terminated.
No branches or pull requests
由于外网被强了,因此克隆后直接使用,但是出现了如下错误:
/tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘bridge_iconv’中:
util/iconv/iconv.go:16:对‘libiconv’未定义的引用
/tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_C2func_iconv_close’中:
util/iconv/iconv.go:88:对‘libiconv_close’未定义的引用
/tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_C2func_iconv_open’中:
util/iconv/iconv.go:110:对‘libiconv_open’未定义的引用
/tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_Cfunc_iconv_close’中:
util/iconv/iconv.go:163:对‘libiconv_close’未定义的引用
/tmp/go-build377085664/util/iconv/_obj/iconv.cgo2.o:在函数‘_cgo_f7d217435582_Cfunc_iconv_open’中:
util/iconv/iconv.go:181:对‘libiconv_open’未定义的引用
collect2: 错误:ld 返回 1
感觉像是动态库找不到的问题,我发现自己的libconv.so在/usr/local/lib目录下,然后我有专门在/etc/ld.so.conf.d/ 添加了一条记录,ldconfig 之后 重新编译还是失败。
应该怎么做呢?(;′⌒`)
The text was updated successfully, but these errors were encountered: