首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >R上的错误消息:“此系统不提供tcl/tk支持”&“非零退出状态”。

R上的错误消息:“此系统不提供tcl/tk支持”&“非零退出状态”。
EN

Stack Overflow用户
提问于 2022-08-15 21:56:11
回答 1查看 219关注 0票数 1

PC:怪物ABRA A5

R版本: R-4.2.1

OS: Manjaro-肉桂

你好,我正在尝试将RNCEP包安装到Rstudio,但是我得到了这个错误:控制台输出是;

代码语言:javascript
复制
> install.packages("RNCEP")
Installing package into ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RNCEP_1.0.10.tar.gz'
Content type 'application/x-gzip' length 302209 bytes (295 KB)
==================================================
downloaded 295 KB

* installing *source* package ‘RNCEP’ ...
** package ‘RNCEP’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning: S3 methods ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Tcl/Tk support is not available on this system
Execution halted
ERROR: lazy loading failed for package ‘RNCEP’
* removing ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.2/RNCEP’
Warning in install.packages :
  installation of package ‘RNCEP’ had non-zero exit status

The downloaded source packages are in
    ‘/tmp/RtmpCYYwmk/downloaded_packages’

而后台乔布斯的输出是;

代码语言:javascript
复制
Installing 'RNCEP' ...
Installing package into ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/RNCEP_1.0.10.tar.gz'
Content type 'application/x-gzip' length 302209 bytes (295 KB)
==================================================
downloaded 295 KB

* installing *source* package ‘RNCEP’ ...
** package ‘RNCEP’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Warning: S3 methods ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found
Error: .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Tcl/Tk support is not available on this system
Execution halted
ERROR: lazy loading failed for package ‘RNCEP’
* removing ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.2/RNCEP’

The downloaded source packages are in
    ‘/tmp/RtmpPzEUVX/downloaded_packages’


✔ Package 'RNCEP' successfully installed.
Warning message:
In utils::install.packages("RNCEP", repos = "https://cran.rstudio.com/") :
  installation of package ‘RNCEP’ had non-zero exit status

我也有同样的问题,一些其他的软件包,但我可以找到他们在风险和我安装了yay,但我找不到任何关于RNCEP。在其他用户的Ubuntu中,有一些解决了相同问题的解决方案,但是由于缺少依赖关系而导致的错误,我安装了所有的依赖项,但是错误仍然发生。然后我为Debian;如何在R中安装tcltk?找到了这个解决方案。

但我想不出我是怎么把这些转化成拱形的。有什么解决方案吗,你能帮我吗?

我的install.packages(tcltk)输出是;

代码语言:javascript
复制
Installing package into ‘/home/vokhirion/R/x86_64-pc-linux-gnu-library/4.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘tcltk’ is a base package, and should not be updated

我的library(tcltk)输出是;

代码语言:javascript
复制
Error: package or namespace load failed for ‘tcltk’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: fun(libname, pkgname)
  error: Tcl/Tk support is not available on this system
In addition: Warning message:
S3 methods ‘as.character.tclObj’, ‘as.character.tclVar’, ‘as.double.tclObj’, ‘as.integer.tclObj’, ‘as.logical.tclObj’, ‘as.raw.tclObj’, ‘print.tclObj’, ‘[[.tclArray’, ‘[[<-.tclArray’, ‘$.tclArray’, ‘$<-.tclArray’, ‘names.tclArray’, ‘names<-.tclArray’, ‘length.tclArray’, ‘length<-.tclArray’, ‘tclObj.tclVar’, ‘tclObj<-.tclVar’, ‘tclvalue.default’, ‘tclvalue.tclObj’, ‘tclvalue.tclVar’, ‘tclvalue<-.default’, ‘tclvalue<-.tclVar’, ‘close.tkProgressBar’ were declared in NAMESPACE but not found 

capabilities()["tcltk"]输出是:

代码语言:javascript
复制
tcltk 
FALSE 

我安装了一些建议其他问题的包,比如;r-dbi、r-curl、r-cli、r-openssl、r-xml、r-gdal、r-geos等等,但是仍然会出现错误。tk也被安装了。如何安装RNCEP?

EN

回答 1

Stack Overflow用户

发布于 2022-08-26 19:03:04

capabilities() # list支持/不支持包。

在我的例子中,tcltk不受支持,X11也被支持(因为tcltk是False,而X11是true)。因此,我下载并提取了R源,并重新配置了‘- with’,然后功能显示tcltk为True,但X11变成了假的。我重新配置了‘--具有- tcltk -和-x’,这使tcltk和X11都成为了True。整个命令是:./configure --enable-R-shlib=yes --with-x=no --with-tcltk --with-x

make # make clean在第二次使用make之前

make install

检查文档在:https://cran.r-project.org/doc/manuals/r-release/R-admin.html和检查C.3.1先决条件部分。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73366810

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档