Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

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

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

ねえちょっと聞いてる?

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?