无法更新/安装在Google Compute Engine(Debian Wheezy)上运行的R 3.2.2中的软件包

时间:2015-08-26 20:18:41

标签: r debian google-compute-engine

我在Debian wheezy上运行的Google Compute Engine上创建了一个基本实例。我的目标是在一个实例上安装R并通过Jupyter / Ipython笔记本远程访问它。

我面临的问题是,一旦我安装 R 3.2.2。 “防火安全”,我尝试使用update.packages()更新软件包,我无法这样做,我收到警告:unable to access index for repository https://cran.<rest of mirror address>这与我选择的哪种CRAN镜像无关( 18个镜子选项)。同样,如果我尝试使用install.packages('jsonlite')安装 jsonlite 等基本软件包,我会收到类似的错误:

Warning: unable to access index for repository https://cran.cnr.Berkeley.edu/src/contrib Warning message: package ‘jsonlite’ is not available (for R version 3.2.2)。同样,这个错误与我选择的镜子无关。

如果它以任何方式对诊断有帮助,我在创建新实例后立即安装R的方式如下:

sudo apt-get update
sudo apt-get upgrade
sudo -i
echo "deb http://cran.r-project.org/bin/linux/debian wheezy-cran3/" > /etc/apt/sources.list.d/cran.list
apt-get update
apt-get upgrade
apt-get install r-base-core r-base-dev

有人可以建议可能导致此更新/安装包问题的原因吗?

1 个答案:

答案 0 :(得分:0)

通过an answer on Unix.SE

  

您需要安装包apt-transport-https。然后你可以使用像

这样的行
deb https://some.server.com/debian stable main
     

sources.list文件中。