How can I install protoc on Ubuntu 16.04?

See https://github.com/protocolbuffers/protobuf/blob/master/src/README.md:

Prerequesites

$ sudo apt-get install autoconf automake libtool curl make g++ unzip

Installation

  1. From this page, download the protobuf-all-[VERSION].tar.gz.
  2. Extract the contents and change in the directory
  3. ./configure
  4. make
  5. make check
  6. sudo make install
  7. sudo ldconfig # refresh shared library cache.

Check if it works

$ protoc --version
libprotoc 3.6.1

sudo apt install protobuf-compiler

If you are a non-C++ user and/or don't want to compile it yourself, the simplest way to install the current version of protoc is to download a pre-built binary from the release page.

https://github.com/protocolbuffers/protobuf/releases

To install, simply place this binary somewhere in your PATH (e.g. /usr/local/bin).

(If you intend to use the included well known types then don't forget to copy the contents of the 'include' directory somewhere as well, for example into /usr/local/include/.)