0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

relenium をインストールしててはまったとこ

Last updated at Posted at 2014-01-22

Rでseleniumが使えるようになった - BOD
ここを参考に relenium パッケージをインストールしようとしたんだけど、下記のようなエラーが出てはまりました。

Error : .onLoad failed in loadNamespace() for 'rJava', details:
call: inDL(x, as.logical(local), as.logical(now), ...)
error: unable to load shared object 'C:/Users/hoge/R/win-library/3.0/rJava/libs/i386/rJava.dll':
LoadLibrary failure: %1 は有効な Win32 アプリケーションではありません。

解決としては、ここを参考に、JAVA_HOME の設定を一時的に消すとうまくいきました。原因は不明のまま。

いちおう手順としては(Windows)、
1. Rtools をインストールする。
2. rJava をインストールする。(うまくいかない場合はここ参照)

install.packages('rJava', repos='http://www.rforge.net/')
library(rJava)

3. devtools をインストールする。

install.packages("devtools")
library(devtools)

4. JAVA_HOME を無効にして seleniumJars と relenium をインストールする。

if (Sys.getenv("JAVA_HOME")!="") Sys.setenv(JAVA_HOME="")
install_github('seleniumJars', 'LluisRamon')
install_github('relenium', 'LluisRamon')

という感じです。
いろいろいじってたので何が効いたのかはよくわからない。
あとは Java も最新版をインストールしました。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?