Using install.packages with custom temp dir

后端 未结 2 1008
無奈伤痛
無奈伤痛 2021-01-20 09:11

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:43

    The documentation in help(tempdir) pretty clearly states that TMP, TMPDIR, ... are used:

    By default, ‘tmpdir’ will be the directory given by ‘tempdir()’. This will be a subdirectory of the per-session temporary directory found by the following rule when the R session is started. The environment variables ‘TMPDIR’, ‘TMP’ and ‘TEMP’ are checked in turn and the first found which points to a writable directory is used: if none succeeds ‘/tmp’ is used.

    So if setting one alone does not help, maybe you want to set several, and make sure the permissions on your 'replacement directory' are permissive enough etc pp.

提交回复
热议问题