美文网首页
NMF、stringi包安装

NMF、stringi包安装

作者: 蚂蚁爱吃饭 | 来源:发表于2021-06-08 14:15 被阅读0次

常规就是>install.packages('NMF')

> install.packages('NMF')
also installing the dependencies ‘stringi’, ‘pkgmaker’, ‘stringr’, ‘reshape2’
接着一个个安,但是在stringi这报错:
trying URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip'

trying URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip'
Error in download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb"): cannot open URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip'

icudt download failed
Error: Stopping on error
In addition: Warning messages:
1: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
  URL 'https://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip': status was 'Couldn't connect to server'
2: In download.file(paste(href, fname, sep = ""), icudtzipfname, mode = "wb") :
  URL 'http://raw.githubusercontent.com/gagolews/stringi/master/src/icu69/data/icu4c-69_1-data-bin-l.zip': status was 'Couldn't connect to server'

我直接wget那个也不行,于是得换一个方式安stringi。其实就是手动安装最新版的stringi,因为它已经内置了ICU data archives,就不要前面还要去下了(前面下载有问题)。
我安的R-4.1.0,于是直接在我的R的目录下:

wget https://github.com/gagolews/stringi/archive/master.zip -O stringi.zip
unzip stringi.zip
sed -i '/\/icu..\/data/d' stringi-master/.Rbuildignore
/project/baowenjuan/APP/R-4.1.0/bin/R CMD build stringi-master

在目录下产生了stringi_1.6.2.9005.tar.gz这个文件,接着手动安:

/project/baowenjuan/APP/R-4.1.0/bin/R CMD INSTALL stringi_1.6.2.9005.tar.gz

我们再回到R界面:

> install.packages('NMF')

就可以啦~

> library('NMF')
Loading required package: pkgmaker
Loading required package: registry

Attaching package: ‘pkgmaker’

The following object is masked from ‘package:S4Vectors’:

    new2

Loading required package: rngtools
Loading required package: cluster
NMF - BioConductor layer [OK] | Shared memory capabilities [NO: bigmemory] | Cores 71/72
  To enable shared memory capabilities, try: install.extras('
NMF
')

Attaching package: ‘NMF’

The following object is masked from ‘package:S4Vectors’:

    nrun

不要问我为啥,我是搜的解决方案(看这个:redhat - icudt error while installing stringi package from r in linux offline - Stack Overflow

所以,<鸟哥的私房菜>需要刷第四遍!!!!

相关文章

网友评论

      本文标题:NMF、stringi包安装

      本文链接:https://www.haomeiwen.com/subject/ettjeltx.html