Hello everyone,
I have a big issue since some weeks without any solution.
Your help will be very appreciated.
I want to deploy my shiny app and I have a problem with the compilers C++17 with terra package.
I got this error message
Error: Command failed (1)
Failed to run system command:
'/opt/R/4.3.2/lib/R/bin/R' --vanilla CMD INSTALL --preclean '/opt/rstudio-connect/mnt/tmp/RtmpdwNoKA/packrat-install-1e2061469277/terra' --library='/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.3.2' --install-tests --no-docs --no-multiarch --no-demo
The command failed with output:
- installing source package ‘terra’ ...
** package ‘terra’ successfully unpacked and MD5 sums checked
** using staged installation
configure: CC: gcc -std=gnu11
configure: CXX: g++ -std=gnu++11
checking for gdal-config... /usr/bin/gdal-config
checking gdal-config usability... yes
configure: GDAL: 2.4.1
checking GDAL version >= 2.0.1... yes
checking for gcc... gcc -std=gnu11
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 the compiler supports GNU C... yes
checking whether gcc -std=gnu11 accepts -g... yes
checking for gcc -std=gnu11 option to enable C11 features... none needed
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for gdal.h... yes
checking GDAL: linking with --libs only... yes
checking GDAL: /opt/gdal/gdal-2.4.1/share/gdal/pcs.csv readable... yes
checking GDAL: checking whether PROJ is available for linking:... yes
checking GDAL: checking whether PROJ is available for running:... yes
configure: GDAL: 2.4.1
configure: pkg-config proj exists, will use it
checking for proj_api.h... yes
configure: PROJ: 4.8.0
checking for pj_init_plus in -lproj... yes
checking PROJ: epsg found and readable... yes
checking for geos-config... /usr/bin/geos-config
checking geos-config usability... yes
configure: GEOS: 3.5.0
checking GEOS version >= 3.4.0... yes
checking for geos_c.h... yes
checking geos: linking with -L/usr/lib64 -lgeos_c... yes
configure: Package CPP flags: -I/opt/gdal/gdal-2.4.1/include -I/usr/include
configure: Package LIBS: -lproj -L/usr/lib64 -lgdal -L/usr/lib64 -lgeos_c
configure: creating ./config.status
config.status: creating src/Makevars
** libs
Error: C++17 standard requested but CXX17 is not defined - removing ‘/opt/rstudio-connect/mnt/app/packrat/lib/x86_64-pc-linux-gnu/4.3.2/terra’
Unable to fully restore the R packages associated with this deployment.
Please review the preceding messages to determine which package
encountered installation difficulty and the cause of the failure.
An error occurred while building your content.
This link offers advice for this kind of error:
Posit Connect Documentation Version 2023.10.0 - Troubleshooting
Build error: An error occurred while building your content. (Error code: r-build-need-cxx-defined)
I read a lot of document and some proposition without resolving the issue.
Thanks for your help.