ltdl.h Not found error while building chaincode

2020-07-10 09:30发布

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

5条回答
欢心
2楼-- · 2020-07-10 09:59

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

yum install libtool-ltdl-devel
查看更多
看我几分像从前
3楼-- · 2020-07-10 10:07

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

查看更多
我只想做你的唯一
4楼-- · 2020-07-10 10:09

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

sudo apt install libtool libltdl-dev

查看更多
手持菜刀,她持情操
5楼-- · 2020-07-10 10:19

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

brew install libtool
查看更多
淡お忘
6楼-- · 2020-07-10 10:19

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.

查看更多
登录 后发表回答