less than 1 minute read


Double-byte characters (Japanese) are used in the Windows user name


Move the position of the Temp file. Run the following at the command prompt

mkdir C:\temp
set TEMP=C:\temp
set TMP=C:\temp

You can use any directory as long as Japanese is not used. After that, you can also use the command prompt, so gem install sqlite3 –platform ruby is executed.

error contents

``` “pkg-config –exists sqlite3” | pkg-config –libs sqlite3 => “-LC:/msys64/mingw64/lib lsqlite3\n” “x86_64-w64-mingw32-gcc -o conftest.exe -IC:/Ruby26-x64/include/ruby-2.6.0/x64-mingw32 -IC:/Ruby26-x64/include/ruby-2.6.0/ruby/ backward -IC:/Ruby26-x64/include/ruby-2.6.0 -I. -D__USE_MINGW_ANSI_STDIO=1 -DFD_SETSIZE=2048 -D_WIN32_WINNT=0x0600 -D__MINGW_USE_VC2005_COMPAT -D_FILE_OFFSET_BITS=64 -O3 -fno-fast-math -fstack strong conftest.c -L. -LC:/Ruby26-x64/lib -L. -pipe -s -fstack-protector-strong -lx64-msvcrt-ruby260 -lshell32 -lws2_32 -liphlpapi -limagehlp -lshlwapi “ Cannot create temporary file in C:\Users\??????\AppData\Local\Temp: Invalid argument checked program was: /* begin */ 1: #include “ruby.h” 2: 3: #include 4: #include 5: int main(int argc, char **argv) 6: { 7: return 0; 8:} /* end */