Skip to content

imtaslim/Install-go-protocol-buffers-in-ubuntu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Install-go-protocol-buffers-in-ubuntu

For using golang & GRPC server you need some dependencies in your ubuntu let's update that first

Go to the website & Download Go in your Downloads Folder

https://go.dev/doc/install

Install Go by running

sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf Downloads/go1.17.4.linux-amd64.tar.gz

now, open the .zshrc file, and add this in the end

export PATH=$PATH:/usr/local/go/bin

save this and run this to check go version

go version

Create go source pages

mkdir -p go/{src,bin,pkg}

Install Protocol Buffers

sudo apt install -y protobuf-compiler

then ensure compiler version is 3+

protoc --version

Install proto gen dependency

go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

now, open the .zshrc file, and add this lines in the end

export GO_PATH=~/go
export PATH=$PATH:/$GO_PATH/bin

save this and update ubuntu

sudo apt-get update

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published