Alex -
Notice that the error message says "Error: proj_api.h not found."
Files ending with a suffix of .h are known as header files, and
on Ubuntu, they are distributed in so-called development packages,
which generally end with -dev . So I'm guessing that you installed
the proj-bin package, and now you need to install the libproj-dev
package.
You'll see the same thing for any R package that needs to be built
against an external library. Installing the library or binary is
not enough -- to build the R package you need the development files.
Hope this helps.
- Phil Spector
Statistical Computing Facility
Department of Statistics
UC Berkeley
spector at stat.berkeley.edu
On Sun, 29 May 2011, Alex Olssen wrote:
> Dear R-helpers,
>
> I am trying to install the package "rgdal" using the command
>
> install.packages("rgdal")
>
> in R. I get the following error
>
> "Error: proj_api.h not found.
> If the PROJ.4 library is installed in a non-standard location,
> use --configure-args='--with-proj-include=/opt/local/include'
> for example, replacing /opt/local/* with appropriate values
> for your installation. If PROJ.4 is not installed, install it.
> ERROR: configuration failed for package ?rgdal?
> * removing ?/home/alex/R/i686-pc-linux-gnu-library/2.11/rgdal?
>
> The downloaded packages are in
> ?/tmp/RtmpVDlld6/downloaded_packages?
> Warning message:
> In install.packages("rgdal") :
> installation of package 'rgdal' had non-zero exit status"
>
> I am using ubuntu 10.10 and have installed PROJ.4 using the software
> center. I have also downloaded a binary of PROJ.4 and placed it in
> /opt/local/
>
> I have looked at the documentation for "rgdal" here -
> http://cran.r-project.org/web/packages/rgdal/index.html
> But it seems to be about using "rgdal" as opposed to installing
it.
>
> Any help would be appreciated.
>
> Kind regards,
>
> Alex
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>