2

RStudioで使用RSQLiteすると、大きなクエリを実行すると次のエラーが発生します

 Error in rsqlite_send_query(conn@ptr, statement) : 
   database or disk is full

基礎となるプロセスが上で動作するように/dev/xvda1。には十分なスペースがありますが、 に取り掛かる/mnt/tmpことができません。sqlite/mnt/tmp

sqlite が etilqs ファイルを作成する一時フォルダーを変更するにはどうすればよいですか? Windows のソリューションを指します。ubuntu で RStudio を実行しています。

私は自分の.profileandに以下をコピーしました/etc/environment(どちら~/.bash_profile~/.bash_login私のホームディレクトリにもありません.

 export TMPDIR=/mnt/tmp
 export TMP=/mnt/tmp
 export TEMP=/mnt/tmp
 export SQLITE_TMPDIR=/mnt/tmp

sqliteコマンドラインで同じ環境変数定義を送信しましたが、まだ使用できません/mnt/tmp

本当にset toで再コンパイルsqliteする必要がありますか?sqlite3_temp_directory/mnt/tmp

試行の間にログオフしました...

の内容はこちら/etc/environment。、引用符の有無にかかわらず試しましexportた。

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
TMPDIR="/mnt/tmp"
TMP="/mnt/tmp"
TEMP="/mnt/tmp"
SQLITE_TMPDIR="/mnt/tmp"
4

2 に答える 2

0

The trick is to define the temporary environment variables in Renviron.site located in $RHOME/etc

My RHOME path is /usr/lib/R, which can be determined by calling R.home().

This is what I added to Renviron.site:

 TMP=/mnt
 TMPDIR=/mnt
 TEMP=/mnt
 SQLITE_TMPDIR=/mnt

I'm still not 100% clear on how rstudio handles user environment variables, and how useful the Shell tool (within rstudio) is to establish env variable 'inheritance'. Anyway, using Renviron.site put my project back on the rails without having to agonise over recompiling sqlite with a new sqlite3_temp_folder global.

于 2017-07-13T22:49:00.517 に答える