我刚刚在时间序列视图中安装了这些包。最后有一些警告,表示某些软件包安装时具有非零退出状态。 我查看了早期的输出,发现警告是因为某些依赖关系是"不可用"。
> install.views("TimeSeries")
...
ERROR: dependency ‘ks’ is not available for package ‘rugarch’
* removing ‘/usr/local/lib/R/site-library/rugarch’
...
ERROR: dependencies ‘TSclust’, ‘longitudinalData’ are not available for package ‘TSdist’
* removing ‘/usr/local/lib/R/site-library/TSdist’
...
The downloaded source packages are in
‘/tmp/RtmpBoB06G/downloaded_packages’
There were 34 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘gmp’ had non-zero exit status
2: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘proj4’ had non-zero exit status
3: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘rgl’ had non-zero exit status
4: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘rpanel’ had non-zero exit status
5: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘RGtk2’ had non-zero exit status
6: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘cairoDevice’ had non-zero exit status
7: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘KFKSDS’ had non-zero exit status
8: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Rmpfr’ had non-zero exit status
9: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘RCurl’ had non-zero exit status
10: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘longitudinalData’ had non-zero exit status
11: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘kza’ had non-zero exit status
12: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘mar1s’ had non-zero exit status
13: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Sim.DiffProc’ had non-zero exit status
14: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘stsm’ had non-zero exit status
15: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Ecfun’ had non-zero exit status
16: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘httr’ had non-zero exit status
17: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Bessel’ had non-zero exit status
18: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘ks’ had non-zero exit status
19: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘lubridate’ had non-zero exit status
20: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Quandl’ had non-zero exit status
21: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘rdatamarket’ had non-zero exit status
22: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Ecdat’ had non-zero exit status
23: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘FeedbackTS’ had non-zero exit status
24: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘nonlinearTseries’ had non-zero exit status
25: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘pdfetch’ had non-zero exit status
26: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘Rssa’ had non-zero exit status
27: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘TimeProjection’ had non-zero exit status
28: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘TSclust’ had non-zero exit status
29: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘tsoutliers’ had non-zero exit status
30: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘rugarch’ had non-zero exit status
31: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘TSdist’ had non-zero exit status
32: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘rmgarch’ had non-zero exit status
33: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘SDD’ had non-zero exit status
34: In install.packages(pkgs[[i]], repos = names(pkgs)[i], ... :
installation of package ‘x12GUI’ had non-zero exit status
由于它们不仅仅有一些,是否可以安装所有尚未以自动方式安装的依赖项?
warnings()
没有说明为什么包裹'安装失败,install.views("TimeSeries")
的输出很多,并且屏幕显示当前可滚动历史记录。
我尝试运行install.views("TimeSeries", dependencies=TRUE)
,输出类似(即某些依赖包不可用)。我在dependencies
的联机帮助页中找到了install.packages()
参数,但是在install.views()
的联机帮助页中找不到它,我仍然试着将它与{{1}一起使用}}。参数instal.views()
是否适用于dependencies
?
我还试图单独安装一个依赖包,并且 由于"配置失败而仍然失败"对于依赖包 它还取决于:
install.views()
谢谢!
答案 0 :(得分:3)
查看输出时,您会看到:
checking for X... libraries , headers
checking GL/gl.h usability... no
checking GL/gl.h presence... no
checking for GL/gl.h... no
checking GL/glu.h usability... no
checking GL/glu.h presence... no
checking for GL/glu.h... no
configure: error: missing required header GL/gl.h
这意味着您的系统没有所需的标头以便编译rgl
。您需要安装这些标头。在我的Ubuntu 14.04系统上,我必须使用
sudo apt-get install mesa-common-dev
之后,编译/配置应该继续进行。
相反,dependencies=true
仅安装R依赖项而不是属于操作系统的依赖项。
答案 1 :(得分:0)
显然我不能只评论...如果可以的话,它将是“运行man R并在免费的Advanced Bash脚本编写指南中查看重定向部分”。
尝试:
man R
下载或查看Advanced Bash Scripting Guide(或abs-guide.pdf)的副本,并阅读有关重定向的部分。
&>filename
# Redirect both stdout and stderr to file "filename."
# This operator is now functional, as of Bash 4, final release.
将install.views("TimeSeries")
放入R脚本文件。
在命令行中,运行:
R [您的选择] CMD BATCH“〜/ path / to / r / script / file.r”&> filename
我不想安装所有的TimeSeries软件包,所以我没有测试过我写的任何东西。
答案 2 :(得分:0)
如果您使用基于debian的Linux发行版,请键入
安装gtk2sudo apt install libgtk2.0-dev
并在R中再试一次。