0
我對Ruby不是很熟悉,但是使用的是需要構建一些Ruby本機擴展的系統實用程序。當我嘗試運行安裝命令,我得到以下堆棧跟蹤:更改Ruby本機擴展的tmp目錄
Building native extensions. This could take a while...
ERROR: Error installing sensu-plugins-http:
ERROR: Failed to build gem native extension.
current directory: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2/ext/unf_ext
/opt/sensu/embedded/bin/ruby -r ./siteconf20161128-17526-tzlgio.rb extconf.rb
checking for main() in -lstdc++... yes
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/opt/sensu/embedded/lib/ruby/gems/2.3.0/extensions/x86_64-linux/2.3.0/unf_ext-0.0.7.2/mkmf.log
current directory: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2/ext/unf_ext
make "DESTDIR=" clean
current directory: /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/unf_ext-0.0.7.2/ext/unf_ext
make "DESTDIR="
compiling unf.cc
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
unf.cc:75:1: fatal error: error writing to /tmp/ccyXxObQ.s: No space left on device
compilation terminated.
make: *** [unf.o] Error 1
make failed, exit code 2
由於種種原因,我的/tmp/
目錄是有意小。我想知道,有沒有辦法讓Ruby/gcc爲構建過程使用不同的臨時位置?