surender
surender

Reputation: 71

ltdl.h Not found error while building chaincode

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

Upvotes: 6

Views: 14112

Answers (5)

mahima
mahima

Reputation: 1975

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

brew install libtool

Upvotes: 6

Enrico Zanardo
Enrico Zanardo

Reputation: 51

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

sudo apt install libtool libltdl-dev

Upvotes: 5

Marshall Fate
Marshall Fate

Reputation: 145

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

yum install libtool-ltdl-devel

Upvotes: 9

Mallikarjuna J S
Mallikarjuna J S

Reputation: 130

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.

Upvotes: 2

Denis Glotov
Denis Glotov

Reputation: 173

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

Upvotes: 16

Related Questions