所以我一直在试图安装Shiny和Devtools R软件包,但我遇到了同样的错误,如下所示:无论它是什么类型的软件包,它总是有一个非零退出并包含“错误:未知类型名称”FILE'“消息。下面是一个例子。为了记录,我已经运行apt-get更新和升级命令,尝试重新安装R和RStudio等,但我一直在遇到这个问题。在Linux Mint上安装R软件包的问题18.1
这里是我的/etc/apt/sources.list:
我卡在这一块,谁能帮助我弄清楚怎样做才能让这些R程序包安装正确?我没有任何运气通过RStudio的IDE或通过CLI尝试它...这里缺少什么?????
install.packages("tibble")
Installing package into ‘/home/lennys/R/x86_64-pc-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependency ‘lazyeval’
trying URL 'https://cloud.r-project.org/src/contrib/lazyeval_0.2.0.tar.gz'
Content type 'application/x-gzip' length 317272 bytes (309 KB)
==================================================
downloaded 309 KB
trying URL 'https://cloud.r-project.org/src/contrib/tibble_1.2.tar.gz'
Content type 'application/x-gzip' length 54517 bytes (53 KB)
==================================================
downloaded 53 KB
* installing *source* package ‘lazyeval’ ...
** package ‘lazyeval’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c expr.c -o expr.o
In file included from expr.c:3:0:
/usr/share/R/include/Rinternals.h:1042:48: error: unknown type name ‘FILE’
void R_InitFileInPStream(R_inpstream_t stream, FILE *fp,
^
/usr/share/R/include/Rinternals.h:1045:50: error: unknown type name ‘FILE’
void R_InitFileOutPStream(R_outpstream_t stream, FILE *fp,
^
/usr/lib/R/etc/Makeconf:132: recipe for target 'expr.o' failed
make: *** [expr.o] Error 1
ERROR: compilation failed for package ‘lazyeval’
* removing ‘/home/lennys/R/x86_64-pc-linux-gnu-library/3.3/lazyeval’
ERROR: dependency ‘lazyeval’ is not available for package ‘tibble’
* removing ‘/home/lennys/R/x86_64-pc-linux-gnu-library/3.3/tibble’
The downloaded source packages are in
‘/tmp/RtmpvLx4dw/downloaded_packages’
Warning messages:
1: In install.packages("tibble") :
installation of package ‘lazyeval’ had non-zero exit status
2: In install.packages("tibble") :
installation of package ‘tibble’ had non-zero exit status
>
更多信息:我一直在努力解决这个问题,但仍然没有成功。我不断看到这样反复,但:
In file included from print_stderr.c:2:0:
/usr/share/R/include/Rinternals.h:1042:48: error: unknown type name ‘FILE’
void R_InitFileInPStream(R_inpstream_t stream, FILE *fp,
^
/usr/share/R/include/Rinternals.h:1045:50: error: unknown type name ‘FILE’
void R_InitFileOutPStream(R_outpstream_t stream, FILE *fp,
感谢您的输入Dirk。可悲的是,我从来没有找到一个可行的解决方案,所以我只是抹去硬盘并切换到Ubuntu 16.04。在Mint中它不起作用,但是在Ubuntu中起作用似乎很奇怪,但这可能是由于我的一些疏忽造成的。 – lennys