嗨,我在尝试安装tidycensus时遇到这个错误,我甚至在尝试安装rgdal时也遇到了错误。我尝试了许多其他帖子说要使用的终端命令,但都不起作用。以下是错误代码。
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发布于 2021-10-07 10:07:32
对我来说有效的是遵循安装最新的空间包的指导--特别是sf。ubuntugis不稳定的PPA很适合我。底层空间库更新非常快,因此保持一致性是一个问题。
https://stackoverflow.com/questions/66037834
复制相似问题