Lnd: Missing netdb.h

Created on 3 Jan 2019  路  3Comments  路  Source: lightningnetwork/lnd

Background

Cant "make".

Your environment

  • version of lnd: git cloned the one available on Jan 3rd 2018
  • which operating system (uname -a on *Nix): Linux Mint Tessa
  • version of btcd, bitcoind, or other backend: Bitcoin Core Daemon version v0.17.1

Steps to reproduce

$ go get -d github.com/lightningnetwork/lnd
$ cd $GOPATH/src/github.com/lightningnetwork/lnd
$ make

Expected behaviour

Build complete

Actual behaviour

```
Building debug lnd and lncli.
GO111MODULE=on go build -v -tags="dev" -o lnd-debug -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v0.5.1-beta-258-gf7fb9486b4bd4b9e74e933b4a7b734edd7e71d85" github.com/lightningnetwork/lnd
Fetching https://gopkg.in/macaroon-bakery.v2?go-get=1
go: finding github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
...
go: downloading git.schwanenlied.me/yawning/bsaes.git v0.0.0-20180720073208-c0276d75487e
net

net

/usr/local/go/src/net/cgo_linux.go:10:10: fatal error: netdb.h: No such file or directory
#include
^~~~~
compilation terminated.
Makefile:99: recipe for target 'build' failed
make: * [build] Error 2
```

golanbuild system

Most helpful comment

Solved by installing libc6-dev

All 3 comments

What version of Go are you using? How did you install it?

I am using GO 1.11.4 installed using Linux binaries from here https://golang.org/dl/
Unpacked the bin in /usr/local and added the path in the .bashrc file.
export PATH=$PATH:/usr/local/go/bin exactly as specified in the Installation Instruction https://golang.org/doc/install

After that, I have also included the following lines in the .bashrc

export GOPATH=~/gocode
export PATH=$PATH:$GOPATH/bin

Solved by installing libc6-dev

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BitBargain picture BitBargain  路  3Comments

ronaldvdmeer picture ronaldvdmeer  路  4Comments

zyp picture zyp  路  4Comments

qubenix picture qubenix  路  3Comments

sunnya97 picture sunnya97  路  3Comments