@Yokota_Manabu
@hide_kojima
あまり役に立たないかもですが、いつか誰かの役に立つかもしれないので、ワークアラウンドとして・・・とりあえず投稿しておきます!
前回の私の投稿は、ローカルのExploratory、Rstudioのものだったので、Dockerで構築しているRstudio Serverの方で試したらエラーが出ました。
ということで、下記のイメージを新たに取得して、Dockerで新たに環境構築をしました。
docker pull rocker/tidyverse:4.0.3
そして、Rstudio Serverにログインして、とりあえずopenrouteservice-r
パッケージをインストール。
remotes::install_github("GIScience/openrouteservice-r")
やはりエラーがでました。インストールの結果を見るとV8
パッケージでエラーが起こっているっぽいので、
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/V8/libs/V8.so':
libnode.so.64: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
さきに依存しているRパッケージのバージョンをあげました。
# 下記はinstall.packages()でバージョン上げました
pkgbuild (1.1.0 -> 1.2.0) [CRAN]
jsonlite (1.7.1 -> 1.7.2) [CRAN]
vctrs (0.3.5 -> 0.3.6) [CRAN]
testthat (3.0.0 -> 3.0.1) [CRAN]
htmlwidgets (1.5.2 -> 1.5.3) [CRAN]
V8
パッケージに必要なライブラリを調べると、予め下記の操作が必要らしく、コンテナに入って、下記を行いました。
sudo apt-get install -y libv8-dev
必要ないのかもしれないですが、パッケージを削除して、入れ直しました。
remove.packages('V8')
install.packages('V8')
そして、openrouteservice-r
パッケージをインストールしました。
remotes::install_github("GIScience/openrouteservice-r")
インストールの結果を見ると、keyring
でエラーが起こっているっぽい
** byte-compile and prepare package for lazy loading
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/usr/local/lib/R/site-library/keyring/libs/keyring.so':
libsecret-1.so.0: cannot open shared object file: No such file or directory
Calls: <Anonymous> ... asNamespace -> loadNamespace -> library.dynam -> dyn.load
Execution halted
keyring
に必要なライブラリをコンテナに入って、インストールしました。
sudo apt-get install -y libssl-dev libsodium-dev libsecret-1-dev
必要ないのかもしれないですが、パッケージを削除して、入れ直しました。
remove.packages('keyring')
install.packages('keyring')
そして、openrouteservice-r
パッケージをインストールしたら無事にいきました。
remotes::install_github("GIScience/openrouteservice-r")
library(openrouteservice)
# Errorなし
packageVersion('openrouteservice')
[1] ‘0.4.1’
些細な事ですが、このパッケージは、GIScience/openrouteservice-r
でインストールするのに、パッケージ名はopenrouteservice
なんですね。ややこしい・・・。