简体   繁体   English

将 qdap package 安装到 R 时出现问题

[英]Trouble Installing qdap package into R

I want to install "qdap" package to run a text mining project.我想安装“qdap”package 来运行文本挖掘项目。 I tried installing the package in many different ways: 1. intsall.packages("qdap") 2. Downloading the file locally then installing 3. Using devtools我尝试以多种不同方式安装 package:1. intsall.packages("qdap") 2. 在本地下载文件然后安装 3. 使用 devtools

library(devtools)
install_github("trinker/qdapDictionaries")
install_github("trinker/qdapRegex")
install_github("trinker/qdapTools")
install_github("trinker/qdap")

I always had the same problem.我总是有同样的问题。 It seems to be related to rJava package.它似乎与 rJava package 有关。 I tried to install rJava but I wasn't successful.我尝试安装 rJava,但没有成功。

I'm more of a data analyst than a developer so I don't have much experience with development (using terminal commands or fixing java on my mac).我更像是数据分析师而不是开发人员,所以我没有太多开发经验(使用终端命令或在我的 Mac 上修复 java)。

I'd really like to use this "qdap" package.我真的很想使用这个“qdap”package。 Could you please help me figure out in a simple manner?你能帮我用简单的方式弄清楚吗?

Here's the error message after I install the package:这是我安装 package 后的错误消息:

The downloaded source packages are in
    ‘/private/var/folders/hk/r0tjy0t57n79lvkh2_fc7snm0000gn/T/RtmpsSJ6Mg/downloaded_packages’
✓  checking for file ‘/private/var/folders/hk/r0tjy0t57n79lvkh2_fc7snm0000gn/T/RtmpsSJ6Mg/remotes42b1730aa4f/trinker-qdap-7f390f7/DESCRIPTION’ (437ms)
─  preparing ‘qdap’: (1.1s)
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts (1.3s)
─  checking for empty or unneeded directories
   Removed empty directory ‘qdap/tools’
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘qdap_2.4.2.tar.gz’

* installing *source* package ‘qdap’ ...
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
Warning in system("/usr/libexec/java_home", intern = TRUE) :
  running command '/usr/libexec/java_home' had status 1
Error : .onLoad failed in loadNamespace() for 'rJava', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so, 6): Library not loaded: /Library/Java/JavaVirtualMachines/jdk-11.0.1.jdk/Contents/Home/lib/server/libjvm.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/rJava/libs/rJava.so
  Reason: image not found
ERROR: lazy loading failed for package ‘qdap’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/qdap’
Error: Failed to install 'qdap' from GitHub:
  (converted from warning) installation of package ‘/var/folders/hk/r0tjy0t57n79lvkh2_fc7snm0000gn/T//RtmpsSJ6Mg/file42b3e031f25/qdap_2.4.2.tar.gz’ had non-zero exit status

Maybe the key is in the following也许关键在以下

Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.

and

Warning in system("/usr/libexec/java_home", intern = TRUE) :
  running command '/usr/libexec/java_home' had status 1

Are you sure you have installed a JVM?你确定你已经安装了 JVM 吗? And if yes, the correct one?如果是,正确的? Because it seems to not find it.因为它似乎找不到它。

You can download JVM from here .您可以从这里下载 JVM。

I hope this helps!我希望这有帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM