Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google colaboratory 在Google Colab(R笔记本)上安装RcppGSL失败_Google Colaboratory_Rcpp - Fatal编程技术网

Google colaboratory 在Google Colab(R笔记本)上安装RcppGSL失败

Google colaboratory 在Google Colab(R笔记本)上安装RcppGSL失败,google-colaboratory,rcpp,Google Colaboratory,Rcpp,install.packages(“RcppGSL”)导致 Installing package into ‘/usr/local/lib/R/site-library’ (as ‘lib’ is unspecified) Warning message in install.packages("RcppGSL"): “installation of package ‘RcppGSL’ had non-zero exit status” [编辑:仅此而已。Colab不打印

install.packages(“RcppGSL”)
导致

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified) 
Warning message in install.packages("RcppGSL"):
“installation of package ‘RcppGSL’ had non-zero exit status”
[编辑:仅此而已。Colab不打印任何其他内容。traceback()也只返回“无可用的回溯”]

在谷歌colab上

您可以通过打开Colab上的R笔记本

编辑2:解决方案

  • 在colab中打开python笔记本。您必须运行一些在colab笔记本的R版本中不起作用的终端命令

  • 运行以下命令

  • 现在可以在单元格中运行R代码,方法是将
    %%R
    放在单元格顶部:

  • 那是一篇不完整的文章。您没有显示实际的基本错误消息,因此我们无法帮助您

    很可能,您只是忘记安装GSL开发包。在Debian/Ubuntu系统上,这将通过

    sudo apt install libgsl-dev
    
    但是,如果您有这样一个系统,您甚至可以从操作系统中为RcppGSL安装预构建的二进制文件:

    sudo apt install r-cran-rcppgsl
    

    编辑:您可能还需要查阅Google Colab文档,以确定是否可以安装其他(系统)软件包。另一种选择是,在RStudio云(现在是一种免费时间有限的商业产品)上,您可以轻松安装软件包。也许在那里试试你的代码?

    谢谢,我不知道RStudio云。
    sudo apt install libgsl-dev
    
    sudo apt install r-cran-rcppgsl