简体   繁体   English

如何在ubuntu 12.04中安装R的fftw3软件包?

[英]How to install the fftw3 package of R in ubuntu 12.04?

I am trying to install the fftw3 package through R console 我正在尝试通过R控制台安装fftw3软件包

>install.packages("fftw")

After this command it is asking to select the cran mirror.I have selected the cran mirror then following error occurs: 执行此命令后,要求选择cran镜像。我选择了cran镜像,然后发生以下错误:

Loading Tcl/Tk interface ... done
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning messages:
1: In open.connection(con, "r") :
unable to connect to 'cran.r-project.org' on port 80.
2: In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw’ is not available (for R version 2.14.1)

And When I am trying for fftw3 then following error occurs: 当我尝试使用fftw3时,会发生以下错误:

> install.packages("fftw3")
Installing package(s) into ‘/root/R/x86_64-pc-linux-gnu-library/2.14’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/src/contrib
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘fftw3’ is not available (for R version 2.14.1)

Can anyone help me out of this? 有人可以帮我吗?

As Paul said, that's probably not an R package. 正如Paul所说,那可能不是R包。 There is an R package that is a wrapper for the FFTW library, also called fftw, you should install that: 有一个R包是FFTW库的包装,也称为fftw,您应该安装该包:

Link to CRAN page of fftw 链接到fftw的CRAN页面

In Ubuntu you have then still the system requirement to have a proper installed fftw library, that you probably can solve via 在Ubuntu中,您仍然需要具有正确安装的fftw库的系统要求,您可以通过以下方法解决

sudo apt-get install fftw3 fftw3-dev pkg-config

The website you linked talks about a C library, there is nothing about an R code package. 您链接的网站谈论的是C库,没有关于R代码包的信息。 You mistakenly assume that R can install any .tar.gz file as an R library. 您错误地认为R可以将任何.tar.gz文件安装为R库。 An R library has a very specific structure of files and directories, and the error you get is because the .tar.gz does not adhere to this structure. R库具有非常特定的文件和目录结构,而您得到的错误是因为.tar.gz不遵循此结构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM