質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.50%
Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RubyGems

RubyGemsはRubyによるプログラミングのためのパッケージマネジメントツールです。ユーザはこれを使用することで、Rubyライブラリのダウンロードやアップデートや、依存関係の自動解決が可能になります。

Debian

Debianは、Debian GNU/Linux などのOS(オペレーティングシステム)です。

Q&A

0回答

2100閲覧

debianでRuby-serialportのインストールができません。

退会済みユーザー

退会済みユーザー

総合スコア0

Ruby

Rubyはプログラミング言語のひとつで、オープンソース、オブジェクト指向のプログラミング開発に対応しています。

RubyGems

RubyGemsはRubyによるプログラミングのためのパッケージマネジメントツールです。ユーザはこれを使用することで、Rubyライブラリのダウンロードやアップデートや、依存関係の自動解決が可能になります。

Debian

Debianは、Debian GNU/Linux などのOS(オペレーティングシステム)です。

0グッド

0クリップ

投稿2016/02/02 11:59

rubyを使ってシリアルポートから読み込みをしようと思い「ruby-serialport」をインストールしようとしているのですがうまく出来ませんどうしたらいいでしょうか?
現在の環境は
・Debian7.9
・ruby1.9.1
・rubygems1.9.1
です.

また,「sudo gem install ruby-serialport」を実行した時のエラーは以下のようなものです.

Building native extensions. This could take a while...
ERROR: Error installing ruby-serialport:
ERROR: Failed to build gem native extension.

current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext

/usr/bin/ruby1.9.1 -r ./siteconf20160203-7968-koi67h.rb extconf.rb
checking for OS... linux
checking for termios.h... yes
checking for unistd.h... yes
creating Makefile

To see why this extension failed to compile, please check the mkmf.log which can be found here:

/usr/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-serialport-0.7.0/mkmf.log

current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext
make clean

current directory: /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0/ext
make
compiling serialport.c
In file included from serialport.h:25:0,
from serialport.c:20:
/usr/include/ruby-1.9.1/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h" [-Wcpp]
In file included from serialport.c:26:0:
impl/posix_serialport.c: In function ‘get_fd_helper’:
impl/posix_serialport.c:41:4: error: unknown type name ‘OpenFile’
impl/posix_serialport.c:43:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:43:4: warning: passing argument 1 of ‘rb_io_check_closed’ from incompatible pointer type [enabled by default]
In file included from /usr/include/ruby-1.9.1/ruby/backward/rubyio.h:6:0,
from serialport.h:25,
from serialport.c:20:
/usr/include/ruby-1.9.1/ruby/io.h:169:6: note: expected ‘struct rb_io_t *’ but argument is of type ‘int *’
In file included from serialport.c:26:0:
impl/posix_serialport.c:44:23: error: request for member ‘f’ in something not a structure or union
impl/posix_serialport.c: In function ‘sp_create_impl’:
impl/posix_serialport.c:50:4: error: unknown type name ‘OpenFile’
impl/posix_serialport.c:77:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:77:4: error: request for member ‘fd’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘stdio_file’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘mode’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘pid’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘lineno’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘pathv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘finalize’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘wbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘rbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘cbuf’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘readconv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_asciicompat’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_pre_ecflags’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_pre_ecopts’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘writeconv_initialized’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘tied_io_for_writing’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘encs’ in something not a structure or union
impl/posix_serialport.c:77:4: error: request for member ‘write_lock’ in something not a structure or union
impl/posix_serialport.c:77:4: warning: assignment from incompatible pointer type [enabled by default]
impl/posix_serialport.c:91:10: warning: ‘rb_check_safe_str’ is deprecated (declared at /usr/include/ruby-1.9.1/ruby/ruby.h:471) [-Wdeprecated-declarations]
impl/posix_serialport.c:92:31: error: ‘struct RString’ has no member named ‘ptr’
impl/posix_serialport.c:133:6: error: request for member ‘f’ in something not a structure or union
impl/posix_serialport.c:134:6: error: request for member ‘mode’ in something not a structure or union
impl/posix_serialport.c: In function ‘sp_set_rts_impl’:
impl/posix_serialport.c:634:4: warning: implicit declaration of function ‘set_signal’ [-Wimplicit-function-declaration]
impl/posix_serialport.c: In function ‘sp_get_rts_impl’:
impl/posix_serialport.c:648:4: warning: implicit declaration of function ‘get_line_signals_helper’ [-Wimplicit-function-declaration]
serialport.c: At top level:
impl/posix_serialport.c:571:13: warning: ‘get_line_signals_helper_impl’ defined but not used [-Wunused-function]
impl/posix_serialport.c:592:14: warning: ‘set_signal_impl’ defined but not used [-Wunused-function]
serialport.c: In function ‘get_fd_helper’:
impl/posix_serialport.c:45:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [serialport.o] エラー 1

make failed, exit code 2

Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/ruby-serialport-0.7.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/extensions/x86_64-linux/1.9.1/ruby-serialport-0.7.0/gem_make.out

よろしくおねがいします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.50%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問