Using install.packages with custom temp dir

后端 未结 2 778
迷失自我
迷失自我 2021-01-20 08:55

I would like to install a package with a security profile that does not have access to /tmp , but has its own temporary directory, for example /tmp/jeroen

2条回答
  •  借酒劲吻你
    2021-01-20 09:22

    The correct answer was given by @hadley in the comments: in order to make sure install.packages uses the custom temporary directory, one needs to do

    Sys.setenv(TMPDIR="/tmp/jeroen")
    

    in addition to:

    configure.vars="TMPDIR=/tmp/jeroen"
    

    This way both the extraction and the installation of the package avoids the system or user default temporary directory.

提交回复
热议问题