【发布时间】:2017-06-21 01:31:37
【问题描述】:
所以我一直在尝试安装 Shiny 和 Devtools R 软件包,但我遇到了如下相同类型的错误:无论哪种类型的软件包,它总是有一个非零退出并包含“错误:未知类型名称“文件””消息。下面是一个例子。作为记录,我已经运行了 apt-get update 和 upgrade 命令,尝试重新安装 R 和 RStudio 等,但我一直遇到这个问题。
这是我的 /etc/apt/sources.list:
#deb cdrom:[Linux Mint 18.1 _Serena_ - Release amd64 20161213]/ xenial contrib main non-free
deb http://cran.rstudio.com/bin/linux/ubuntu xenial/
deb https://cloud.r-project.org/bin/linux/ubuntu xenial/
我被这个卡住了,谁能帮我弄清楚如何才能让这些 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,
【问题讨论】:
标签: r rstudio linux-mint