LoginSignup
4
2

More than 3 years have passed since last update.

Ubuntu に Ruby/Tk をインストールする

Last updated at Posted at 2018-05-01

Ubuntuにインストールする場合、

gem install tk

だけでうまくいく時もあるが、これで失敗しても、今までと同じような方法で適当なオプションを指定するとインストールできるケースがある。

sudo apt install tk-dev
install.sh
gem install tk -- --with-tcltkversion=8.6 \
--with-tcl-lib=/usr/lib/x86_64-linux-gnu \
--with-tk-lib=/usr/lib/x86_64-linux-gnu \
--with-tcl-include=/usr/include/tcl8.6 \
--with-tk-include=/usr/include/tcl8.6 \
--enable-pthread

拡張ライブラリを使用する場合は、適宜 apt search などで検索して apt install する。新しく拡張ライブラリを入れた時、そのまますぐ認識する場合と、tk のgem をインストールし直さないと、拡張ライブラリを認識しないことがあるようだ。

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2