我剛買了一臺新機器并全新安裝了 Ubuntu 21.10,因為我讀到更新的內核與圖形驅動程式配合得更好。我計劃在可用時更新到 22.04 LTS。然而,我沒有意識到我可能會遇到 R 的挑戰。
有很多的問題,在這里等在Ubuntu上安裝R,但似乎沒有足夠新,解決了Ubuntu 21.10版本。
R 的 Ubuntu 軟體包 - 完整說明指出
截至 2021 年 5 月 19 日,受支持的版本為
- Hirsute Hippo(21.04,僅限 amd64)
- Groovy Gorilla(20.10,僅限 amd64),
- Focal Fossa(20.04;僅限 LTS 和 amd64),
- 仿生海貍 (18.04; LTS) 和
- Xenial Xerus (16.04; LTS)。
所以,如果我理解正確,我有三個選擇:
- 卸載 21.10 并替換為 21.04
- 等待 21.10 的支持
- 從源安裝 R
現在,問題是,我是否理解正確,或者我可以使用例如 21.04 存盤庫( hirsute-cran40/)?
uj5u.com熱心網友回復:
顯然,使用舊版本的存盤庫是可以的。
Andre Wildeberg 鼓勵我(謝謝!)并將 21.04 存盤庫 ( hirsute-cran40/)添加到我的/etc/apt/sources.list:
deb https://cloud.r-project.org/bin/linux/ubuntu hirsute-cran40/
CRAN 指令中缺少的是添加相關的 GPG 密鑰。我使用了來自 Digital Ocean的 Lisa Tagliaferry的示例,盡管它給出了棄用警告:
$ https://www.digitalocean.com/community/tutorials/how-to-install-r-on-ubuntu-20-04
...
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.cul0ddtmN1/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg: key 51716619E084DAB9: public key "Michael Rutter <[email protected]>" imported
gpg: Total number processed: 1
gpg: imported: 1
然后我安裝了基礎R:
$ sudo apt-get update
$ sudo apt-get install r-base
一切似乎都運行良好。
uj5u.com熱心網友回復:
您需要該存盤庫的更新簽名密鑰:
root:~# apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
Executing: /tmp/apt-key-gpghome.MsSJzqgwfx/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg: key 51716619E084DAB9: "Michael Rutter <[email protected]>" 1 new signature
gpg: failed to start agent '/usr/bin/gpg-agent': No such file or directory
gpg: can't connect to the agent: No such file or directory
gpg: Total number processed: 1
gpg: new signatures: 1
root:~# apt update
Get:1 https://cloud.r-project.org/bin/linux/ubuntu hirsute-cran40/ InRelease [3628 B]
Get:2 http://security.ubuntu.com/ubuntu impish-security InRelease [110 kB]
Hit:3 http://archive.ubuntu.com/ubuntu impish InRelease
Get:4 http://archive.ubuntu.com/ubuntu impish-updates InRelease [110 kB]
Get:5 http://archive.ubuntu.com/ubuntu impish-backports InRelease [101 kB]
Fetched 325 kB in 1s (422 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root:#
你有一個,頑皮的作業正常。也就是說,多毛二進制檔案也應該可以作業(甚至是焦點二進制檔案,就像r-cran-*LTS 版本的 5000 多個二進制檔案“cran2deb4ubuntu”存盤庫一樣)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/387555.html
上一篇:為什么我的AWK函式只能在我的檔案的縮短版本上作業?
下一篇:Ceedling可選YML檔案
