gpt4 book ai didi

r - 无法在 Raspberry pi 3 B 中安装 R 3.6

转载 作者:行者123 更新时间:2023-12-03 16:38:37 25 4
gpt4 key购买 nike

问题

大家好,我需要在我的 raspberry pi 3 B 中安装 R 软件(至少 3.5 但希望是 3.6)

我开始做通常的事情:

sudo apt-get update
sudo apt install r-base r-base-dev

哪个有效,但我得到了 R 3.3

然后我尝试了我在这个 webpage 中发现的内容它的工作原理是:
sudo add-apt-repository 'deb http://cran.dcc.uchile.cl/bin/linux/debian stretch-cran35/'

但我收到以下错误:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 95, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
self.reload_sourceslist()
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
(self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch

我不确定我做错了什么

请帮忙!!

最佳答案

最后经过多次尝试,我像这样编译它:

sudo apt-get install -y gfortran libreadline6-dev libx11-dev libxt-dev \
libpng-dev libjpeg-dev libcairo2-dev xvfb \
libbz2-dev libzstd-dev liblzma-dev \
libcurl4-openssl-dev \
texinfo texlive texlive-fonts-extra \
screen wget openjdk-8-jdk
cd /usr/local/src
sudo wget https://cran.rstudio.com/src/base/R-3/R-3.6.1.tar.gz
sudo su
tar zxvf R-3.6.1.tar.gz
cd R-3.6.1
./configure --enable-R-shlib #--with-blas --with-lapack #optional
make
make install
cd ..
rm -rf R-3.6.1*
exit
cd

如果有人有更快更好的版本就更好了

关于r - 无法在 Raspberry pi 3 B 中安装 R 3.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57023388/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com