問題1:
Installation path not writeable, unable to update packages: boot, class, KernSmooth, Matrix, nlme, nnet, spatial
解決方案:
sudo R
update.packages()
問題2:
依賴包安裝出錯(cuò)
解決方案:仔細(xì)查看報(bào)錯(cuò)信息茎芋,解決問題
例如:
Configuration failed to find libgit2 library. Try installing:
* brew: libgit2 (MacOS)
* deb: libgit2-dev (Debian, Ubuntu, etc)
* rpm: libgit2-devel (Fedora, CentOS, RHEL)
打開終端殊校,安裝libgit2-dev(我的電腦是Ubuntu系統(tǒng))
sudo aptitude install libgit2-dev
問題3:
安裝ggthemr報(bào)錯(cuò)
> install.packages("ggthemr")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘ggthemr’ is not available (for R version 3.6.3)
> source("https://bioconductor.org/biocLite.R")
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
> if (!requireNamespace("BiocManager", quietly = TRUE))
+ install.packages("BiocManager")
> BiocManager::install("ggthemr")
Bioconductor version 3.10 (BiocManager 1.30.10), R 3.6.3 (2020-02-29)
Installing package(s) 'ggthemr'
Installation path not writeable, unable to update packages: boot, class, KernSmooth, Matrix, nlme, nnet, spatial
Warning message:
package ‘ggthemr’ is not available (for R version 3.6.3)
解決方案:仔細(xì)查看報(bào)錯(cuò)信息谆吴,解決問題,谷遂,采用devtools安裝
install.packages("devtools")
library(devtools)
devtools::install_github("ggthemr")
# Error in parse_repo_spec(repo) : Invalid git repo specification: 'ggthemr'
devtools::install_github("Mikata-Project/ggthemr") #打開GitHub,找到地址,https://github.com/Mikata-Project/ggthemr
OK粘昨!