pi@raspberrypi:~$ sudo gem install pi_piper Building native extensions. This could take a while... ERROR: Error installing pi_piper: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from extconf.rb:4:in `<main>' Gem files will remain installed in /var/lib/gems/1.9.1/gems/ffi-1.9.3 for inspection. Results logged to /var/lib/gems/1.9.1/gems/ffi-1.9.3/ext/ffi_c/gem_make.out pi@raspberrypi:~$
どうやらpi_piperを入れるには ruby_ffi というパッケージが必要らしい. apt-getでインストール.
pi@raspberrypi:~$ sudo apt-get install ruby-ffi ...省略...自動でgemに登録されないので、手動で登録. 以下はrubyのバージョンが1.9.1の場合の例.
pi@raspberrypi:~$ cd /var/lib/gems/1.9.1/specifications/ pi@raspberrypi:~$ sudo ln -s /usr/share/rubygems-integration/1.9.1/specifications/ffi-1.0.11.gemspec .gem listで正しく登録できているか確認できます.
pi@raspberrypi:/var/lib/gems/1.9.1/specifications$ gem list *** LOCAL GEMS *** ffi (1.0.11) pi@raspberrypi:/var/lib/gems/1.9.1/specifications$再度gemでpi_piperをインストール.
pi@raspberrypi:~$ sudo gem install pi_piper Fetching: pi_piper-1.3.2.gem (100%) Successfully installed pi_piper-1.3.2 1 gem installed Installing ri documentation for pi_piper-1.3.2... unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/pi_piper/libbcm2835.img, skipping Installing RDoc documentation for pi_piper-1.3.2... unable to convert "\x80" from ASCII-8BIT to UTF-8 for lib/pi_piper/libbcm2835.img, skipping pi@raspberrypi:~$成功しました!
0 件のコメント :
コメントを投稿