我无法安装tidyverse或devtools,但出现此错误:
/usr/lib/R/etc/Makeconf:172: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 1
例如,这些是install.packages(“ tidyverse”,依靠= TRUE)的结果:
^
/usr/lib/R/etc/Makeconf:172: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘xml2’
* removing ‘/usr/local/lib/R/site-library/xml2’
ERROR: dependency ‘xml2’ is not available for package ‘rvest’
* removing ‘/usr/local/lib/R/site-library/rvest’
ERROR: dependencies ‘rvest’, ‘xml2’ are not available for package ‘tidyverse’
* removing ‘/usr/local/lib/R/site-library/tidyverse’
我的R版本:
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 5.3
year 2019
month 03
day 11
svn rev 76217
language R
version.string R version 3.5.3 (2019-03-11)
nickname Great Truth
我已经尝试安装每个单独的依赖项,但是每次都会得到相同的错误(有时具有不同的依赖项星座:rvest,roxygen2,rversions,lintr等)。我也尝试过卸载Rcpp并重新安装它。我已经尝试过更新我的软件包(update.packages(checkBuilt = TRUE,ask = FALSE)。我还没有搞砸其他设置。它在Ubuntu 16.04上运行,内存为2GB。这可能是内存问题吗?我需要从头开始并重新安装吗?
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
total used free shared buff/cache available
Mem: 1971 932 653 16 385 830
Swap: 999 518 481
添加的信息:我看到它在其他地方建议尝试从github安装最新版本的xml2:remotes :: install_github(“ hadley / xml2”)
这是我在执行此操作时遇到的错误(类似于之前的错误)
^
/usr/lib/R/etc/Makeconf:172: recipe for target 'RcppExports.o' failed
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘xml2’
─ removing ‘/tmp/RtmpNcUpLL/Rinst1bbc679e28bc/xml2’
-----------------------------------
ERROR: package installation failed
Error: Failed to install 'xml2' from GitHub:
System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines):
> from RcppExports.cpp:4:
> /usr/include/unicode/ucnv.h:585:1: error: ‘unique_ptr’ in namespace ‘std’ does not name a template type
> U_DEFINE_LOCAL_OPEN_POINTER(LocalUConverterPointer, UConverter, ucnv_close);
> ^
> /usr/lib/R/etc/Makeconf:172: recipe for target 'RcppExports.o' failed
> make: *** [RcppExports.o] Error 1
> ERROR: compilation failed for package ‘xml2’
> * removing ‘/tmp/RtmpNcUpLL/Rinst1bbc679e28bc/xml2’
> -----------------------------------
> ERROR: package installation failed
>
R CMD配置--all
的结果
CC = gcc -std=gnu99
CFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CPICFLAGS = -fpic
CPP = gcc -std=gnu99 -E
CPPFLAGS =
CXX = g++
CXXCPP = g++ -E
CXXFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CXXPICFLAGS = -fpic
CXX11 = g++
CXX11STD = -std=gnu++11
CXX11FLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CXX11PICFLAGS = -fpic
CXX14 = g++
CXX14STD = -std=gnu++14
CXX14FLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CXX14PICFLAGS = -fpic
CXX98 = g++
CXX98STD = -std=gnu++98
CXX98FLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CXX98PICFLAGS = -fpic
CXX17 =
CXX17STD =
CXX17FLAGS =
CXX17PICFLAGS =
CXX1X = g++
CXX1XSTD = -std=gnu++11
CXX1XFLAGS = -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
CXX1XPICFLAGS = -fpic
DYLIB_EXT = .so
DYLIB_LD = gcc -std=gnu99
DYLIB_LDFLAGS = -shared -fopenmp
F77 = gfortran
FFLAGS = -g -O2 -fstack-protector-strong
FPICFLAGS = -fpic
FLIBS = -lgfortran -lm -lquadmath
SAFE_FFLAGS = -g -O2 -fstack-protector-strong -msse2 -mfpmath=sse
FC = gfortran
FCFLAGS = -g -O2 -fstack-protector-strong
FCPICFLAGS = -fpic
OBJC =
OBJCFLAGS =
JAVA = /usr/lib/jvm/default-java/jre/bin/java
JAVAC = /usr/lib/jvm/default-java/bin/javac
JAVAH = /usr/lib/jvm/default-java/bin/javah
JAR = /usr/lib/jvm/default-java/bin/jar
JAVA_HOME = /usr/lib/jvm/default-java
JAVA_LIBS = -L/usr/lib/jvm/default-java/jre/lib/amd64/server -ljvm
JAVA_CPPFLAGS = -I/usr/lib/jvm/default-java/include -I/usr/lib/jvm/default-java/include/linux
LDFLAGS = -Wl,-Bsymbolic-functions -Wl,-z,relro
SHLIB_CFLAGS =
SHLIB_CXXLD = g++
SHLIB_CXXLDFLAGS = -shared
SHLIB_CXX98LD = g++ -std=gnu++98
SHLIB_CXX98LDFLAGS = -shared
SHLIB_CXX11LD = g++ -std=gnu++11
SHLIB_CXX11LDFLAGS = -shared
SHLIB_CXX14LD = g++ -std=gnu++14
SHLIB_CXX14LDFLAGS = -shared
SHLIB_CXX17LD =
SHLIB_CXX17LDFLAGS = -shared
SHLIB_EXT = .so
SHLIB_FFLAGS =
SHLIB_LD = gcc -std=gnu99
SHLIB_LDFLAGS = -shared
SHLIB_FCLD = gfortran
SHLIB_FCLDFLAGS = -shared
SHLIB_CXX1XLD = g++ -std=gnu++11
SHLIB_CXX1XLDFLAGS = -shared
TCLTK_CPPFLAGS = -I/usr/include/tcl8.6 -I/usr/include/tcl8.6
TCLTK_LIBS = -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -L/usr/lib/x86_64-linux-gnu -ltk8.6 -lX11 -lXss -lXext
BLAS_LIBS = -lblas
LAPACK_LIBS = -llapack
MAKE = make
LIBnn = lib
LOCAL_SOFT =
COMPILED_BY =
答案 0 :(得分:0)
最终,通过在命令行执行此操作,我最终能够将xml2安装到其他库目录中:
sudo apt-get install r-cran-xml2
此命令将xml2安装到/ usr / lib / R / site-library目录中,而使用R和install.packages默认情况下将安装到/ usr / local / lib / R / site-library目录中。没有工作。
一旦安装了xml2,它就允许我安装devtools并暂时解决了我的问题,但是如果我尝试使用sudo R-> install安装tidyverse或其他软件包,仍然会出现rcpp错误。包(“ xml2”)。如果有人对此发生并有任何见解,我很想知道发生了什么!