Once installed geos library (C++, and C), and then trying to install rgeos package (R), it reports geos-config missing!

Solution 1:

Install the libgeos-dev Install libgeos-dev package with your favourite package manager (or software centre) and you'll have /usr/bin/geos-config.

How did I find this? I used the query geos-config for files on the http://packages.ubuntu.com/ webpage. This will list the package you need (query link). Use this next time when you run into similar issues!

Solution 2:

Since the OP doesn't name a specific distribution, here is the line I needed to install goes-config on CENTOS (e.g., RHEL & Amazon Linux): yum install -y geos-devel