I have Ubuntu 16.04 and R 3.4.3. When I run

```r
install.packages("geojson", dep=TRUE)

```

in R, I get the following error:

> 
> dependency ‘protolite’ is not available for package ‘geojson’
> 
> 
> 

Therefore I run

```r
install.packages("protolite", dep=TRUE)

```

to which I get:

```
Configuration failed because protobuf was not found. Try installing:
 * deb: libprotobuf-dev (Debian, Ubuntu, etc)
 * rpm: protobuf-devel (Fedora, EPEL)
 * csw: protobuf_dev (Solaris)
 * brew: protobuf (OSX)
If protobuf is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a protobuf.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

```

However, running `protoc --version` in terminal I get

```
libprotoc 2.6.1

```

So it seems I have the latest version installed. I also tried copying `protobuf.pc` in `/usr/lib/pkconfig/` and setting `PKG_CONFIG_PATH` with 

```
export PKG_CONFIG_PATH=/usr/lib/pkgconfig

```

with no success. I don't know how to check if `pkg-config` is in my
`PATH`, nor how to follow the latter manual instructions. In particular, I don't know what directories I should write for `INCLUDE_DIR=...` and `LIB_DIR=...`.

How should I proceed?