При установке некоторых пакетов gem под правами пользователя происходит ошибка:
# gem install typo
Building native extensions. This could take a while...
ERROR: Error installing typo:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby18 extconf.rb install typo
creating Makefile
make
cc -I. -I/usr/local/lib/ruby/1.8/i386-freebsd6 -I/usr/local/lib/ruby/1.8/i386-freebsd6 -I. -fPIC -O2 -fno-strict-aliasing
-pipe -fPIC -c fastthread.c
fastthread.c: In function `wait_condvar':
fastthread.c:626: warning: passing arg 1 of `rb_ensure' from incompatible pointer type
cc -shared -o fastthread.so fastthread.o -L. -L/usr/local/lib -Wl,-R/usr/local/lib -L. -rdynamic
-Wl,-soname,fastthread.so -Wl,-R -Wl,/usr/local/lib -L/usr/local/lib -lruby18 -lcrypt -lm -rpath=/usr/lib:/usr/local/lib
-pthread -lc
make install
mkdir -p /home/magnus/.gems/gems/fastthread-1.0.1/lib
/usr/bin/install -c -o root -g wheel -m 0755 fastthread.so /home/magnus/.gems/gems/fastthread-1.0.1/lib
install: root: Invalid argument
*** Error code 67
Stop in /home/magnus/.gems/gems/fastthread-1.0.1/ext/fastthread.
Gem files will remain installed in /home/magnus/.gems/gems/fastthread-1.0.1 for inspection.
Results logged to /home/magnus/.gems/gems/fastthread-1.0.1/ext/fastthread/gem_make.out
Лечится это установкой переменной RB_USER_INSTALL:
# setenv RB_USER_INSTALL "install -s -m 555"