如何使用Musl-cross交叉编译go-oci8

我尝试构建golang packege,然后出现错误。
看起来跨领域找不到oracle客户端
,因此我将跨音乐库移动到ORACLE_HOME目录,但此问题未能解决。</ p>

  $ GOOS = linux GOARCH = amd64 CGO_ENABLED = 1 CC = / usr  / local / bin / x86_64-linux-musl-cc转到建立-v main.go 

.....
.....
mime / multipart
crypto / tls
github.com/ denisenkom / go-mssqldb
net / http / httptrace
net / http
github.com/jinzhu/gorm/dialects/mssql
#github.com/mattn/go-oci8
/usr/local/Cellar/musl- 交叉/0.9.7_1/libexec/bin/../lib/gcc/x86_64-linux-musl/6.3.0/../../../../x86_64-linux-musl/bin/ld:无法 查找-lclntsh
collect2:错误:ld返回1退出状态
</ code> </ pre>
</ div>

展开原文

原文

I tried to build golang packege, then I got error. It looks musl-cross couldn't find oracle client library. So that I moved musl-cross libraries to ORACLE_HOME directory but this problem didn't solve.

 $ GOOS=linux GOARCH=amd64 CGO_ENABLED=1 CC=/usr/local/bin/x86_64-linux-musl-cc go build -v main.go


.....
.....
mime/multipart
crypto/tls
github.com/denisenkom/go-mssqldb
net/http/httptrace
net/http
github.com/jinzhu/gorm/dialects/mssql
# github.com/mattn/go-oci8
/usr/local/Cellar/musl-cross/0.9.7_1/libexec/bin/../lib/gcc/x86_64-linux-musl/6.3.0/../../../../x86_64-linux-musl/bin/ld: cannot find -lclntsh
collect2: error: ld returned 1 exit status

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐