简体   繁体   English

尝试在 Ubuntu 18.04 上安装 tidycensus package 时出错

[英]Error when trying to install tidycensus package on Ubuntu 18.04

Hi I am getting this error when trying to install tidycensus, I even get errors when trying to install rgdal.您好,我在尝试安装 tidycensus 时遇到此错误,甚至在尝试安装 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


What works for me is to follow the guidance for installing the most up to date spatial packages - particularly sf .对我有用的是遵循安装最新空间包的指导 - 特别是sf The ubuntugis-unstable PPA works for me. ubuntugis-unstable PPA 对我有用。 The underlying spatial libraries are updating quite rapidly, so keeping consistent is a problem.底层空间库更新非常快,因此保持一致是一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM