LoginSignup
0
0

More than 5 years have passed since last update.

jupyter/r-notebook で devtools::install_github() すると Installation failed: error in running command でコケる

Posted at

hoxo-m 氏の pforeach を docker コンテナ jupyter/r-notebook:c54800018c2c でインストールしようとしたら tarball の展開でコケた…。Jupyter Project が提供する立派な公式コンテナなのに…。

解決策

  1. options(unzip = 'internal') する
  2. Sys.setenv(TAR = "/bin/tar") する
> install.packages("devtools", repos="https://cran.ism.ac.jp/") # 統数研に感謝
> getOption('unzip') # 
''
> options(unzip = 'internal')
> getOption('unzip')
'internal'
> Sys.getenv("TAR")
'/bin/gtar'
> Sys.setenv(TAR = "/bin/tar") # https://github.com/conda-forge/r-devtools-feedstock/issues/4
> Sys.getenv("TAR")
'/bin/tar'

コンテナとか Jupyter の問題というより conda で作った環境の問題っぽい?。jupyter/r-notebook に gtar とか入っとらん。

他のバージョンのコンテナで起きる問題かどうかとか何も検証しとらんけど困った人がおったら辿り着けるように置いとくね。

Reference

  1. Jupyter notebook official r-notebook container: https://hub.docker.com/r/jupyter/r-notebook/
  2. hoxo-m/pforeach: https://github.com/hoxo-m/pforeach
  3. R で超簡単に並列処理を書けるパッケージ pforeach を作った: http://d.hatena.ne.jp/hoxo_m/20141222/p1
  4. 'unzip' must be a single character string when calling install_github: https://github.com/r-lib/devtools/issues/406
  5. install_github fails in conda environment on Linux: https://github.com/conda-forge/r-devtools-feedstock/issues/4

ねえちょっと聞いてる?

0
0
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
0