0

Hi I am getting this error when trying to install tidycensus, I even get errors when trying to install rgdal. I've tried many terminal commands that other posts have said to use, but nothing has worked. Here is the error code.

projectit.cpp: In function ‘SEXPREC* project_ng_coordOp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’:
projectit.cpp:169:6: error: conflicting declaration of C function ‘SEXPREC* project_ng_coordOp(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP)’
 SEXP project_ng_coordOp(SEXP proj, SEXP inv, SEXP aoi, SEXP ob_tran,
      ^~~~~~~~~~~~~~~~~~
In file included from projectit.cpp:11:0:
rgdal.h:142:6: note: previous declaration ‘SEXPREC* project_ng_coordOp(SEXP, SEXP, SEXP, SEXP)’
 SEXP project_ng_coordOp(SEXP proj, SEXP inv, SEXP aoi, SEXP ob_tran); // both
      ^~~~~~~~~~~~~~~~~~
/usr/lib/R/etc/Makeconf:181: recipe for target 'projectit.o' failed
make: *** [projectit.o] Error 1
ERROR: compilation failed for package ‘rgdal’
* removing ‘/home/shiny/R/x86_64-pc-linux-gnu-library/4.0/rgdal’
ERROR: dependency ‘rgdal’ is not available for package ‘tigris’
* removing ‘/home/shiny/R/x86_64-pc-linux-gnu-library/4.0/tigris’
ERROR: dependency ‘tigris’ is not available for package ‘tidycensus’
* removing ‘/home/shiny/R/x86_64-pc-linux-gnu-library/4.0/tidycensus’

The downloaded source packages are in
    ‘/tmp/RtmpHAAY2J/downloaded_packages’
Warning messages:
1: In install.packages("tidycensus") :
  installation of package ‘rgdal’ had non-zero exit status
2: In install.packages("tidycensus") :
  installation of package ‘tigris’ had non-zero exit status
3: In install.packages("tidycensus") :
  installation of package ‘tidycensus’ had non-zero exit status


Kits Gum
  • 1
  • 1
  • I think the error is `rgdal`, some links that might help https://twitter.com/RogerBivand/status/1291622288211750913?s=20 https://stackoverflow.com/questions/63245141/recipe-for-target-projectit-o-failed-while-installing-rgdal – M.Viking Feb 04 '21 at 02:46

1 Answers1

0

What works for me is to follow the guidance for installing the most up to date spatial packages - particularly sf . The ubuntugis-unstable PPA works for me. The underlying spatial libraries are updating quite rapidly, so keeping consistent is a problem.

paulb20
  • 191
  • 3