Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proj_api.h not found in standard or given locations error DESPITE SPECIFYING PROJ INCLUDE #28

Closed
nbarsch opened this issue Oct 30, 2018 · 22 comments

Comments

@nbarsch
Copy link

nbarsch commented Oct 30, 2018

cd ${install_directory}
mkdir lwgeom
cd lwgeom
wget https://cran.r-project.org/src/contrib/lwgeom_0.1-4.tar.gz
R CMD INSTALL --configure-args="--with-proj-include=${install_directory}/proj/include --with-proj-lib=${install_directory}/proj/lib" lwgeom_0.1-4.tar.gz

ends up with the error:

checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’

DESPITE:

ls ${install_directory}/proj/include
geodesic.h  org_proj4_PJ.h  proj_api.h  projects.h  proj.h
@e-kotov
Copy link

e-kotov commented Mar 31, 2019

check your PROJ_LIB environment variable inside R (it may differ from what you have in terminal and system wide)

in terminal:
echo $PROJ_LIB

or in R:
Sys.getenv("PROJ_LIB")

maybe it is set to something weird, e.g. my env variables are messed up with NextGIS installation and my PROJ_LIB was set to
"/Users/user1/Applications/NextGIS/Library/Frameworks/proj.framework/Resources/proj"

to fix that, if you are on mac, for example, and installed proj using brew, the path should be something like
/usr/local/Cellar/proj/6.0.0/share/proj
or
/usr/local/Cellar/proj/5.2.0/share/proj

Simply set the correct path before building the lwgeom:
Sys.setenv("PROJ_LIB" = "/usr/local/Cellar/proj/6.0.0/share/proj")
then
devtools::install_github("r-spatial/lwgeom", force = T)

@edzer
Copy link
Member

edzer commented Mar 31, 2019

See also #42

@ChuliangXiao
Copy link

See r-spatial/sf#1091 (comment)
Try installing pkg-config on command line first.

@ghost
Copy link

ghost commented Aug 22, 2019

update

i was able to fix this by installing a more recent version of PostGIS.

detail: CentOS is pretty far behind on (recommended) versions of PostGres and PostGIS. this is documented here. by updating to PostGres 9.2 and PostGIS 9.3 (based on the link), I was able to get lwgeom, which may not have been available on the version I had installed previously (or, I may have installed it incorrectly as well). Note, if you upgrade PostGIS, you need to re-install pgRouting, though the error message is not explicit about it.

after upgrading, you should be able to install this package, using a source directory. i had to tell R to use a tmp directory in my user space, and tell install.packages to look in my R environment's directory, which is also in this case located in the user directory.

# bash
$ mkdir -p ~/tmp
$ chmod +x ~/tmp
$ export TMPDIR=~/tmp
$ R
> CONDA_PREFIX <- Sys.getenv("CONDA_PREFIX")
> install.packages("lwgeom",  configure.args=stringr::str_interp("--with-proj-include=${CONDA_PREFIX}/include/ --with-proj-lib=${CONDA_PREFIX}/lib/"))

original post

hello. same error for me. using conda for this R environment in CentOS 7 on an AWS EC2 instance.

i installed proj and proj-devel via yum, which gives me version 4.8.0 of proj, and installs the header files in /usr/include.

i attempted to make a change via the $PROJ_LIB environment variable but it doesn't work out for me:

$ ls /usr/include | grep proj_api
proj_api.h
$ R

R version 3.5.1 (2018-07-02) -- "Feather Spray"
...
> library(devtools)
> Sys.getenv("PROJ_LIB")
[1] "/home/user/R_env/include"
> Sys.setenv("PROJ_LIB" = "/usr/include")
> install.packages("lwgeom")
...
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.

/usr/include is in my $PATH as well.

i am not wizard enough with the configure shell script to understand which "standard or given locations" the script is looking in.

my next thought, by the way, is to build proj from source. before i dive into that, any thoughts? thank you!

@RodrigoGM
Copy link

Hello all, I'm having the same issue here installing on a Centos7 server. I don't have root access, brew, nor anaconda; and can't reboot the server. Anaconda sets different paths that when installing some packages, these interfere with the native R-3.6.1 installed by the sysadmin. Thus I've compiled gdal-3.0.1/, proj-6.2.0/ and libgeotiff. Both compiled successfully with --prefix=$HOME. All csv files in libgeotiff were linked to the gdal data directory in ~/share/gdal and directories proj-6.2.0 to have access to pcs.csv, and proj.db.

I've gone through issues #41, #42, r-spatial/sf#1091 (comment), r-spatial/sf#988. After numerous failed reinstallation attempts (below) I've now symlinked all proj *.h, gdal *.h, libgeotiff *.csv files, among others under one roof in the ~/share/gdal/ (see below for list of files).

Despite numerous forms of PROJ_LIB specifications, and methods of installing, I'm continue to get the configure: error: proj_api.h not found in standard or given locations error.

Could anyone help to figure out what exactly I'm doing wrong? or why the proj_api.h is still not usable? what changes should I be doing?

Any support would be much appreciated. r-spatial/sf is a dependency for monocle3, a package which I'm trying to install.

Thanks in advance,

Rodrigo

Error details

Warning in untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
* installing to library ‘~/R/x86_64-pc-linux-gnu-library/3.6’
* installing *source* package ‘sf’ ...
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
checking for gdal-config... ~/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 3.0.1
checking GDAL version >= 2.0.0... yes
checking for gcc... gcc -std=gnu99
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc -std=gnu99 accepts -g... yes
checking for gcc -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gdal.h usability... yes
checking gdal.h presence... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: ~/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ.4 is available for linking:... yes
checking GDAL: checking whether PROJ.4 is available fur running:... yes
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘sf’

BASH command line installation attempts :

R CMD INSTALL v0.6-3.tar.gz --configure-args='-with-gdal-config=/home/gularter/src/gdal-3.0.1/apps/gdal-config
R CMD INSTALL sf-v0-6.3tar.gz --command-args="--with-proj-include=~/include/ --with-proj-lib=~/lib"
R CMD INSTALL v0.6-3.tar.gz --configure-args="--with-proj-include=~/src/proj-6.2.0/src"

PROJ_LIB="$HOME/share/gdal/:$HOME/include/:$HOME/lib/:$HOME/src/proj-6.2.0/:$HOME/"
R CMD INSTALL v0.6-3.tar.gz
"

BiocManager installation attempts :

> Sys.setenv("PROJ_LIB"="~/include/")
> BiocManager::install("sf", force = TRUE)

> Sys.setenv("PROJ_LIB"="~/src/proj-6.2.0/")
> BiocManager::install("sf", force = TRUE)

> Sys.setenv("PROJ_LIB"="~/share/gdal/")
> BiocManager::install("sf", force = TRUE)

> Sys.setenv("PROJ_LIB"="~/share/gdal/:~/include/:~/lib/:~/src/proj-6.2.0/:~/")
> BiocManager::install("sf", force = TRUE)

Files in ~/share/gdal/

$ ls -F ~/share/gdal/
add_esri_column.py@                        csv_tools.py@                 gcs.csv@                          ITRF2000@               jpfgdgml_RdEdg.gfs       nitf_spec.xsd        proj@                            s57agencies.csv
alias.csv@                                 csv.txt@                      gcs.override.csv@                 ITRF2008@               jpfgdgml_RdMgtBdry.gfs   null@                proj_api.h                       s57attributes.csv
area.csv@                                  cubewerx_extra.wkt            gdalicon.png                      ITRF2014@               jpfgdgml_RdSgmtA.gfs     odbc2csv@            proj_config.h@                   s57expectedinput.csv
bag_template.xml                           datum.c@                      GDALLogoBW.svg                    jpfgdgml_AdmArea.gfs    jpfgdgml_RvrMgtBdry.gfs  ogrvrt.xsd           proj_constants.h@                s57objectclasses.csv
build_pcs.py@                              datum.csv@                    GDALLogoColor.svg                 jpfgdgml_AdmBdry.gfs    jpfgdgml_SBAPt.gfs       osmconf.ini          proj.db@                         seed_2d.dgn
build_spm.py@                              datum_shift.csv@              GDALLogoGS.svg                    jpfgdgml_AdmPt.gfs      jpfgdgml_SBArea.gfs      other.extra@         proj_experimental.h@             seed_3d.dgn
CH@                                        datum_shift_pref.csv@         gdalvrt.xsd                       jpfgdgml_BldA.gfs       jpfgdgml_SBBdry.gfs      ozi_datum.csv        proj.h@                          stateplane.csv
change.csv@                                default.rsc                   geoccs.csv@                       jpfgdgml_BldL.gfs       jpfgdgml_WA.gfs          ozi_ellips.csv       proj_internal.h@                 supersession.csv@
compdcs.csv@                               deprecation.csv@              GL27@                             jpfgdgml_Cntr.gfs       jpfgdgml_WL.gfs          pci_datum.txt        projjson.schema.json@            trailer.dxf
coordinate_axis.csv@                       Dockerfile@                   gmlasconf.xml                     jpfgdgml_CommBdry.gfs   jpfgdgml_WStrA.gfs       pci_ellips.txt       proj_json_streaming_writer.hpp@  unit_of_measure.c@
coordinate_axis_name.csv@                  ecw_cs.wkt                    gmlasconf.xsd                     jpfgdgml_CommPt.gfs     jpfgdgml_WStrL.gfs       pcs.c@               proj_math.h@                     unit_of_measure.csv@
coordinate_operation.csv@                  eedaconf.json                 gml_registry.xml                  jpfgdgml_Cstline.gfs    LICENSE.TXT              pcs.csv@             projop_wparm.c@                  vdv452.xml
coordinate_operation_method.csv@           ellipsoid.c@                  gt_datum.csv                      jpfgdgml_ElevPt.gfs     load_pg.sh@              pcs.override.csv@    projop_wparm.csv@                vdv452.xsd
coordinate_operation_parameter.csv@        ellipsoid.csv@                gt_ellips.csv                     jpfgdgml_GCP.gfs        nad27@                   pdfcomposition.xsd   proj_symbol_rename.h@            version_history.csv@
coordinate_operation_parameter_value.csv@  epsg.wkt                      header.dxf                        jpfgdgml_LeveeEdge.gfs  nad83@                   pds4_template.xml    README@                          vertcs.csv@
coordinate_operation_path.csv@             esri_datum_override.csv@      inspire_cp_BasicPropertyUnit.gfs  jpfgdgml_RailCL.gfs     nad.lst@                 pg_to_csv.py@        ruian_vf_ob_v1.gfs               vertcs.override.csv@
coordinate_reference_system.csv@           esri_StatePlane_extra.wkt     inspire_cp_CadastralBoundary.gfs  jpfgdgml_RdArea.gfs     naming_system.csv@       plscenesconf.json    ruian_vf_st_uvoh_v1.gfs          world@
coordinate_system.csv@                     extract_docker_artifacts.sh@  inspire_cp_CadastralParcel.gfs    jpfgdgml_RdASL.gfs      netcdf_config.xsd        prime_meridian.c@    ruian_vf_st_v1.gfs
csv2c.py@                                  gcs.c@                        inspire_cp_CadastralZoning.gfs    jpfgdgml_RdCompt.gfs    nitf_spec.xml            prime_meridian.csv@  ruian_vf_v1.gfs

Files in ~/include/

$ ls -F ~/include/
apr-1/                    cpl_json.h           cpl_spawn.h        epsg_pm.inc             gdaljp2abstractdataset.h  geocent.h@         geo_simpletags.h   ogr_api.h           proj/                           util.hpp@
common.hpp@               cplkeywordparser.h   cpl_string.h       epsg_proj.inc           gdaljp2metadata.h         geo_config.h       geotiff.h          ogr_core.h          proj_api.h                      vrtdataset.h
coordinateoperation.hpp@  cpl_list.h           cpl_time.h         epsg_units.inc          gdal_mdreader.h           geo_ctrans.inc     geotiffio.h        ogr_feature.h       proj_config.h@                  wkt1_generated_parser.h@
coordinatesystem.hpp@     cpl_minixml.h        cpl_virtualmem.h   epsg_vertcs.inc         gdal_pam.h                geodesic.h         geo_tiffp.h        ogr_featurestyle.h  proj_constants.h                wkt1_parser.h@
cpl_atomic_ops.h          cpl_minizip_ioapi.h  cpl_vsi_error.h    fst/                    gdalpansharpen.h          geo_incode_defs.h  geovalues.h        ogr_geocoding.h     proj_experimental.h             wkt2_generated_parser.h@
cpl_auto_close.h          cpl_minizip_unzip.h  cpl_vsi.h          gdal_alg.h              gdal_priv.h               geo_keyp.h         gnm_api.h          ogr_geometry.h      proj.h                          wkt2_parser.h@
cpl_config_extras.h       cpl_minizip_zip.h    cpl_vsi_virtual.h  gdal_alg_priv.h         gdal_proxy.h              geokeys.h          gnmgraph.h         ogr_p.h             proj_internal.h@                xtiffio.h
cpl_config.h              cpl_multiproc.h      crs.hpp@           gdal_csv.h              gdal_rat.h                geokeys.inc        gnm.h              ogrsf_frmts.h       proj_json_streaming_writer.hpp  zconf.h
cpl_conv.h                cpl_odbc.h           datum.hpp@         gdal_frmts.h            gdal_simplesurf.h         geonames.h         io.hpp@            ogr_spatialref.h    proj_math.h@                    zlib.h
cpl_csv.h                 cpl_port.h           epsg_datum.inc     gdalgeorefpamdataset.h  gdal_utils.h              geo_normalize.h    jellyfish-1.1.12/  ogr_srs_api.h       proj_symbol_rename.h
cpl_error.h               cpl_progress.h       epsg_ellipse.inc   gdalgrid.h              gdal_version.h            geos/              memdataset.h       openssl@            rawdataset.h
cpl_hash_set.h            cpl_quad_tree.h      epsg_gcs.inc       gdalgrid_priv.h         gdal_vrt.h                geos_c.h           metadata.hpp@      org_proj4_PJ.h      tre/
cpl_http.h                cpl_serv.h           epsg_pcs.inc       gdal.h                  gdalwarper.h              geos.h             nn.hpp@            pj_list.h@          utf8proc.h

Files in ~/share/proj/

$ ls -F ~/share/proj/
CH  GL27  ITRF2000  ITRF2008  ITRF2014  nad27  nad83  nad.lst  null  other.extra  proj.db  projjson.schema.json  world

@xiaokunx
Copy link

On Amazon Linux (a version of Redhat?) I also have to install proj-devel, proj-epsg, proj-nad via yum.

@kaianfs31
Copy link

I had a similar problem installing rgdal for R due to a previous installation of Anaconda.

Anaconda was changing the PROJ_LIB value.

To solve, I changed my .bashrc because there is a section for initialization of Anaconda:

>>> conda initialize >>>

!! Contents within this block are managed by 'conda init' !!

__conda_setup="$('/home/kaian/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/kaian/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/kaian/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/home/kaian/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup

<<< conda initialize <<<

I simply commented all this section

@ramespada
Copy link

Did you first install sudo apt install libproj-dev?

It works to me

@lepennec
Copy link

Dear all,

I'm having the same configure: error: proj_api.h not found in standard or given locations. issue with my Fedora 31 (which uses the old proj 5.2.0!). What is really strange is that I can install sf without any issue and I could not spot the difference in the configure.ac file...
Let me know if I can help debugging this issue.

seandavi added a commit to seandavi/sars2pack that referenced this issue Apr 11, 2020
@lepennec
Copy link

This is fixed (at least for me) with the new commit: 9d1dbe2

@edzer
Copy link
Member

edzer commented Apr 12, 2020

Please check that lwgeom 0.2-3, now on CRAN, also installs on fedora.

@lepennec
Copy link

Check done: this is working!

@edzer edzer closed this as completed Apr 12, 2020
@edzer
Copy link
Member

edzer commented Apr 12, 2020

thanks!

@arnonerba
Copy link

It looks like lwgeom 0.2-3 no longer works on Ubuntu 18.04:

configure: error: proj_api.h not found in standard or given locations.

However, the previously installed version (0.2-1) still works (and proj_api.h is available at /usr/include/proj_api.h):

> library('lwgeom')
Linking to liblwgeom 3.0.0beta1 r16016, GEOS 3.6.2, PROJ 4.9.3

I know that PROJ 4.9.3 is an older version, but https://CRAN.R-project.org/package=lwgeom still lists PROJ (>= 4.8.0) as a dependency. Is it possible that 4.9.3 is no longer supported?

@edzer
Copy link
Member

edzer commented Apr 13, 2020

Could you confirm you're looking at 0.2-3, @arnonerba ? I'm asking because the ubuntu platforms of travis give a clean install & check with PROJ 4.9.3 (I believe) installed: https://travis-ci.org/github/r-spatial/lwgeom

@arnonerba
Copy link

Interesting...here's the full output of update.packages():

> update.packages()
lwgeom :
 Version 0.2-1 installed in /usr/local/lib/R/site-library 
 Version 0.2-3 available at https://cloud.r-project.org
Update? (Yes/no/cancel) y
trying URL 'https://cloud.r-project.org/src/contrib/lwgeom_0.2-3.tar.gz'
Content type 'application/x-gzip' length 500834 bytes (489 KB)
==================================================
downloaded 489 KB

* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’
* removing ‘/usr/local/lib/R/site-library/lwgeom’
* restoring previous ‘/usr/local/lib/R/site-library/lwgeom’

The downloaded source packages are in
	‘/tmp/RtmpytKY7F/downloaded_packages’
Warning message:
In install.packages(update[instlib == l, "Package"], l, contriburl = contriburl,  :
  installation of package ‘lwgeom’ had non-zero exit status
> 

Also, these are all the PROJ-related packages that seem to be installed:

proj-bin/bionic,now 4.9.3-2 amd64 [installed,automatic]
proj-data/bionic,bionic,now 4.9.3-2 all [installed,automatic]
libproj-dev/bionic,now 4.9.3-2 amd64 [installed,automatic]
libproj12/bionic,now 4.9.3-2 amd64 [installed,automatic]

edzer added a commit that referenced this issue Apr 14, 2020
@edzer
Copy link
Member

edzer commented Apr 14, 2020

Hope this fixes it!

@Akronix
Copy link

Akronix commented Apr 17, 2020

Hello!

I was facing a similar issue as @arnonerba did, with the small difference that I'm running Ubuntu 16.04 and my proj version is 4.9.2-2.

So, first I tried the usual approach:
0)

> install.packages("lwgeom")
Installing package into ‘/home/akronix/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://cloud.r-project.org/src/contrib/lwgeom_0.2-3.tar.gz'
Content type 'application/x-gzip' length 500834 bytes (489 KB)
==================================================
downloaded 489 KB

* installing *source* package ‘lwgeom’ ...
** package ‘lwgeom’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
checking proj_api.h usability... no
checking proj_api.h presence... no
checking for proj_api.h... no
configure: error: proj_api.h not found in standard or given locations.
ERROR: configuration failed for package ‘lwgeom’
* removing ‘/home/akronix/R/x86_64-pc-linux-gnu-library/3.6/lwgeom’
Warning in install.packages :
  installation of package ‘lwgeom’ had non-zero exit status

I checked, and proj_api.h is in /usr/include:

> $ locate proj_api.h 
/usr/include/proj_api.h

So I tried the recommendations above:
1)

> Sys.getenv("PROJ_LIB")
[1] ""
> Sys.setenv("PROJ_LIB" = "/usr/include/")
> install.packages("lwgeom")
> install.packages("lwgeom",  configure.args=stringr::str_interp("--with-proj-include=/usr/include/ --with-proj-lib=/usr/include/"))
> devtools::install_github("r-spatial/lwgeom", configure.args=stringr::str_interp("--with-proj-share=/usr/include/"))
Downloading GitHub repo r-spatial/lwgeom@master
✓  checking for file ‘/tmp/RtmpNMNnFD/remotes785f6ca3d55/r-spatial-lwgeom-467dc31/DESCRIPTION’ ...
─  preparing ‘lwgeom’:
✓  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘lwgeom_0.2-4.tar.gz’
   
Installing package into ‘/home/akronix/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
* installing *source* package ‘lwgeom’ ...
** using staged installation
configure: CC: gcc -std=gnu99
configure: CXX: g++ -std=gnu++11
configure: pkg-config proj exists, will use it
configure: PROJ: 4.9.2
checking for pj_init_plus in -lproj... yes
configure: PROJ_LIB: /usr/include/
checking PROJ: epsg found and readable... no
Error: proj/epsg not found
Either install missing proj support files, for example
the proj-nad and proj-epsg RPMs on systems using RPMs,
or if installed but not autodetected, set PROJ_LIB to the
correct path, and if need be use the --with-proj-share=
configure argument.
ERROR: configuration failed for package ‘lwgeom’
* removing ‘/home/akronix/R/x86_64-pc-linux-gnu-library/3.6/lwgeom’
Error: Failed to install 'lwgeom' from GitHub:
  (converted from warning) installation of package ‘/tmp/RtmpNMNnFD/file785f477f282/lwgeom_0.2-4.tar.gz’ had non-zero exit status

No luck with any of those, so finally I tried to install old version 0.2-1 and it worked! ✔️

install.packages("https://cloud.r-project.org/src/contrib/Archive/lwgeom/lwgeom_0.2-1.tar.gz", repo=NULL, type="source")

😕

@youngdjn
Copy link

I was having this same issue, but simply using one line of @e-kotov 's suggestion, devtools::install_github("r-spatial/lwgeom", force = T), worked for me. The PROJ_LIB env variable does not exist in my system in terminal or in R, but this doesn't seem to matter. I'm on Linux Mint 19.3.

@federicotallis
Copy link

I've tried all of these approaches and haven't been able to get it to work. I continue to get the following error during deployment:

[2020-05-04T14:59:37.257437052+0000] Building R package: lwgeom (0.2-3)
/mnt/packages/build /mnt

  • installing to library ‘/opt/R/3.6.3/lib/R/library’
  • installing source package ‘lwgeom’ ...
    ** package ‘lwgeom’ successfully unpacked and MD5 sums checked
    ** using staged installation
    configure: CC: gcc
    configure: CXX: g++ -std=gnu++11
    configure: pkg-config proj exists, will use it
    checking proj_api.h usability... no
    checking proj_api.h presence... no
    checking for proj_api.h... no
    configure: error: proj_api.h not found in standard or given locations.
    ERROR: configuration failed for package ‘lwgeom’
  • removing ‘/opt/R/3.6.3/lib/R/library/lwgeom’

@simoccc
Copy link

simoccc commented May 10, 2021

Hi all.
I've faced this issue for long and tried to debug in everything I could, even if I'm not a "R" guy at all... After all the tries I've done looking deep I've solved installing the devel package of sqlite3, don't ask me why cause I don't know. Hope to help someone facing the exact same issue as myself... Best Regards S

@Ajeet1699
Copy link

Ajeet1699 commented Jun 11, 2021

Hi simoccc
It worked...Thanks for saving the day.
I just do it by on centos8:
sudo dnf install sqlite
sudo dnf install sqlite-devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests