在Ubuntu中安装R的Igraph套件



我正在使用以下命令在Ubuntu中安装R的Igraph软件包:install.packages("igraph")

但是我遇到了一个错误:

警告:无法访问存储库的索引
http://ftp.iitm.ac.in/cran/src/contrib:无法打开URL 'http://ftp.iitm.ac.in/cran/src/contrib/packages的警告消息: 软件包" igraph'不可用(对于R版本3.3.2)

有人可以指导这个问题,在此我出错了...

you 可能还是想要一个二进制包,我最近重新解释了如何做到这一点:

最简单的方法就是这样(而且我只显示命令,而不是在我在Ubuntu 16.04的Docker实例中执行此操作时的输出,而我在帐户为root的Docker中进行此操作;否则请添加sudo在前面)

apt-get update     # refresh
apt-get install software-properties-common
add-apt-repository -y "ppa:marutter/rrutter"
add-apt-repository -y "ppa:marutter/c2d4u"
apt-get update     # now with new repos
apt-get install r-cran-igraph

它将及其所有依赖性工作。您没有告诉我们您拥有的Ubuntu版本。我所展示的作品,例如在Ubuntu 16.04;对于较旧的版本,您需要add-apt-repository命令的其他软件包。

我怀疑服务器正在下降或您的网络下降,或者您需要通过代理进行。

我可以通过以下方式设置无法出现的cran镜子来复制此消息。

> options(repos="http://example.com/")
> install.packages("foo")
Installing package into ‘/nobackup/rowlings/RLibrary/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://example.com/src/contrib:
  cannot open URL 'http://example.com/src/contrib/PACKAGES'
Warning message:
package ‘foo’ is not available (for R version 3.2.3) 

因此,要么再次尝试,也许服务器已启动,要么检查您的本地网络是否还可以,或者尝试另一个cran镜像,或者与本地网络管理员检查是否需要设置代理服务器。

您必须安装"构建" Ender-Endential First

sudo apt-get install build-essential

在Ubuntu和Debian Linux上也需要安装lixml2和libxml2-dev软件包。

如果不起作用,请检查包装的网页以获取额外的文档

最新更新