Cannot find package google protobuf

0 votes

I am compiling an open source project written in go (openblockchain). I get the following error when I do go build. Can anyone help me with this issue

Compilation Error

> go build
../go/src/ cannot find package "google/protobuf" in any of:
    /usr/src/pkg/google/protobuf (from $GOROOT)
    /home/vichu/go/src/google/protobuf (from $GOPATH)

Additional Information

I referred the question here in Stack Overflow but still no luck in solving the issue. Here is some more information about what all I have:

Protoc version is up to date.

> protoc --version 
libprotoc 3.0.0

My environment variables

> echo $GOPATH
> echo $GOBIN

Protobuf has been built using the README.

~/go/src/$ ls
AUTHORS  CONTRIBUTORS  jsonpb  LICENSE  Makefile  Make.protobuf  proto  protoc-gen-go  proto.pb.go  ptypes


I did the following Util.go in source code as mentioned in answer. The source code is open source and here is the link

-       gp "google/protobuf"
+       gp ""

When I do go get, the below is the error

 go get
can't load package: package no buildable Go source files in /home/vichu/go/src/
Oct 1, 2018 in Blockchain by sabby
• 4,370 points

1 answer to this question.

0 votes

Firstly, your import is wrong, you are trying to import a C++ package, not a golang package. It needs to be:

import ("")

If you don't have this package installed already, you need to run from command line:

go get
answered Oct 1, 2018 by Perry
• 17,100 points

Related Questions In Blockchain

+1 vote
4 answers
0 votes
1 answer
0 votes
1 answer

Truffle init: Error: Cannot find module 'original-require'

I think you need to run this ...READ MORE

answered Oct 24, 2018 in Blockchain by Omkar
• 69,210 points
0 votes
4 answers

Hyperledger fabric: enrollAdmin.js Error: Cannot find module 'fabric-client'

Change your directory to fabric-samples/fabrcar. And run: npm ...READ MORE

answered Nov 21, 2018 in Blockchain by Omkar
• 69,210 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

How to input realtime data from google sheets into urlfetch google scripts?

Based on your title I hope to ...READ MORE

answered Oct 12, 2018 in Blockchain by Perry
• 17,100 points
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP