[Windows] gem install sqlite3 cannot be done ~ Cannot create temporary file in C: \ version ~

Cause

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

Solution

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

Any directory is fine as long as Japanese is not used. After that, you can use the command prompt, so run gem install sqlite3 --platform ruby.

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-protector-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 <winsock2.h>
4: #include <windows.h>
5: int main(int argc, char **argv)
6: {
7:   return 0;
8: }
/* end */


Recommended Posts

[Windows] gem install sqlite3 cannot be done ~ Cannot create temporary file in C: \ version ~
[Windows] gem install sqlite3 cannot be done
[Windows] gem install sqlite3 cannot be done ~ package configuration for sqlite3 is not found ~
Create a jar file that can be executed in Gradle
rbenv install 2.7.1 fails with "no acceptable C compiler found in $ PATH" and "cannot load such file"