在Linux Mint上安装R软件包的问题18.1
所以我一直在试图安装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,
我没有答案,但我只能告诉你,
- 在Debian和Fedora CRAN测试,它当然它的工作原理有
- 失落人们的使用Ubuntu,迈克尔通过他的PPA建立> 3K包
- 也许造币厂更改默认的库
-
FILE
是一件很普通的老C,是真的应该知道 - 您的报告缺少细节,因为我们不能告诉编译器,什么libc中,...你用
话又说回来,首先第一件事情:你有包裹r-base-dev
安装这确保了一堆其他的依赖符合?
最后,记录从我的Ubuntu 16.10的笔记本电脑:
[email protected]:~$ install.r tibble
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 ‘tibble’ ...
** package ‘tibble’ successfully unpacked and MD5 sums checked
** libs
ccache g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O3 -Wall -pipe -Wno-unused -pedantic -march=native -c RcppExports.cpp -o RcppExports.o
ccache g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-library/Rcpp/include" -fpic -g -O3 -Wall -pipe -Wno-unused -pedantic -march=native -c matrixToDataFrame.cpp -o matrixToDataFrame.o
g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o tibble.so RcppExports.o matrixToDataFrame.o -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/tibble/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (tibble)
The downloaded source packages are in
‘/tmp/downloaded_packages’
[email protected]:~$
标准提醒:在R-SIG-debian的也许问其他造币厂用户潜伏在那里。
我一直在做这个足够长的时间来知道如果我想安装RStudio & R,那么最好先检查一下并找出如何预先。所以当查询(ubuntu mint 16.10 rstudio安装apt-get)没有返回类似于可用答案的东西时,我并不感到惊讶。所以,我做了调查,并设法在以下URL中发现了这些问题,并描述了一个命令行解决方案,以使事情正常工作。
如果这个问题得到解决,那会很酷,但我的感觉是因为固有的牦牛剃须(http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html)SNAFU水平与Ubuntu v16.04到v16.10非功能性相同,所以这些修复描述仍然可行,并且可能充当修复其他软件包的相当好的模板。
- 在Ubuntu 16.10(https://mikewilliamson.wordpress.com/2016/11/14/installing-r-studio-on-ubuntu-16-10/)
- 安装RStudio RStudio安装在Ubuntu 16。10由于失败libgstreamer(RStudio install on Ubuntu 16.10 fails due to libgstreamer)
干杯,odoncaoa
我跑薄荷18.1,和刚刚安装R 2与:
sudo apt-get install r-base r-base-dev
(我猜只是“R-基础开发”是足够)
作为非root用户,然后我开始r
和类型:
install.packages('tibble')
它询问了镜像,我选择了一个地理位置接近的镜像,它询问我是否想创建一个本地存储库(而不是系统范围的存储库),并且我说是。
我的输出然后与你的不同:
also installing the dependencies ‘rlang’, ‘Rcpp’
trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/rlang_0.1.1.tar.gz'
Content type 'application/x-gzip' length 201419 bytes (196 KB)
==================================================
downloaded 196 KB
trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/Rcpp_0.12.11.tar.gz'
Content type 'application/x-gzip' length 2485092 bytes (2.4 MB)
==================================================
downloaded 2.4 MB
trying URL 'https://cran.ma.imperial.ac.uk/src/contrib/tibble_1.3.3.tar.gz'
Content type 'application/x-gzip' length 91511 bytes (89 KB)
==================================================
downloaded 89 KB
即tibble是版本1.3.3,不是1.2,而rcpp和rlang是依赖关系,而不是lazyeval。但我怀疑这与你所得到的错误信息有关,并且更多的是在二月到六月间发生变化的事情。
我从另一个答案中看出,你放弃并重新安装操作系统(Mint/Ubuntu的差异不会导致你看到的错误)。我怀疑一个不太极端的解决方案是卸载r并重新安装,确保它是你正在安装的'r-base-dev'。如果继续,卸载并重新安装'gcc',因为抱怨FILE
是C编译器安装严重搞砸的标志。
感谢您的输入Dirk。可悲的是,我从来没有找到一个可行的解决方案,所以我只是抹去硬盘并切换到Ubuntu 16.04。在Mint中它不起作用,但是在Ubuntu中起作用似乎很奇怪,但这可能是由于我的一些疏忽造成的。 – lennys