因此,我一直在尝试安装Shiny和Devtools R包,但我遇到了类似的错误:无论哪种类型的包,它总是有一个非零退出,并包括“错误:未知类型名称‘文件’”的消息。下面是一个示例。根据记录,我已经运行了apt-get更新和升级命令,尝试重新安装R和RStudio,等等,但我一直遇到这个问题。
下面是我的/etc/apt/Soures.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,发布于 2017-02-04 03:54:48
我没有答案,但我只能告诉你
FILE是非常普通的旧C,这真的应该知道然后,首先要做的事情是:您是否安装了包r-base-dev,以确保满足一系列其他依赖项?
最后,从我的Ubuntu 16.10笔记本电脑上登录:
edd@brad:~$ 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’
edd@brad:~$ 标准建议:当其他Mint用户潜伏在那里时,可以询问r-sig-debian。
发布于 2017-04-22 06:02:54
我已经这样做了很长时间了,我知道如果我想安装RStudio & R,那么最好提前检查并找出如何安装。因此,当查询(ubuntu mint16.10 rstudio install apt-get)没有返回任何类似于可用答案的内容时,我并不感到惊讶。因此,我做了调查,并设法偶然发现了以下URL,它们清楚地说明了问题,并描述了一个命令行解决方案来让事情变得正常工作。
如果这个问题已经修复,那将是很酷的,但我的感觉是,因为固有的Yak Shaving (http://sethgodin.typepad.com/seths_blog/2005/03/dont_shave_that.html)混乱级别是ubuntuv16.04到v16.10的非功能性,这些修复描述仍然是可行的,并且可能作为修复类似损坏的其他包的一个相当好的模板。
由于libgstreamer (RStudio install on Ubuntu 16.10 fails due to libgstreamer)的原因,在Ubuntu 16.10上安装R-Studio的
干杯,牙科动物
发布于 2017-06-11 19:23:20
我正在运行Mint 18.1,并且刚刚使用以下命令安装了R:
sudo apt-get install r-base r-base-dev(我猜"r-base-dev“就足够了。)
然后,我以非根用户的身份启动r并输入:
install.packages('tibble')它询问mirror,我选择了一个地理位置接近的库,它问我是否想要创建一个本地存储库(而不是系统范围的存储库),我回答是的。
因此,我的输出与您的不同:
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。但我怀疑这与你收到的错误消息有关,更多的是与2月至6月之间发生的一些变化有关。
我从另一个答案中看到您放弃并重新安装了操作系统( Mint/Ubuntu的差异不会导致您看到的错误)。我怀疑一个不那么极端的解决方案是卸载r,然后重新安装,确保你正在安装的是'r-base-dev‘。如果它继续下去,卸载并重新安装'gcc',因为抱怨FILE是一个迹象,C编译器安装严重搞砸了。
https://stackoverflow.com/questions/42028292
复制相似问题