ltdl.h Not found error while building chaincode

烂漫一生 提交于 2019-12-09 17:56:22

问题


I am trying to build a chaincode by using go build. when i run Go build command its reporting

.\hyperledger\fabric\vendor\github.com\miekg\pkcs11\pkcs11.g‌​o:29:18: 
fatal error:ltdl.h: No such file or directory
compilation terminated

I installed libtools from this link. But I am getting the same error


回答1:


It worked for me on ubuntu: sudo apt install libltdl-dev




回答2:


if you are using centos/RHEL 7 you can use this code

yum install libtool-ltdl-devel



回答3:


For Mac, make sure you have brew installed. This command worked for me:

brew install libtool



回答4:


On Debian/Ubuntu environment, try using the following command:

sudo apt install libtool libltdl-dev




回答5:


make sure to add --tags nopkcs11 to ur go build or go test command. The error should stop appearing

Example : go build --tags nopkcs11

This will compile your chaincode if you are in development and testing your code.



来源:https://stackoverflow.com/questions/43626320/ltdl-h-not-found-error-while-building-chaincode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!