LoginSignup
4
1

More than 5 years have passed since last update.

readlineがupdateされたことによりbyebugがエラーを出す

Last updated at Posted at 2019-01-19

libreadlineが見つからない

rubyファイルを実行しようとしたら以下のエラーが出た。

Sorry, you can't use byebug without Readline. To solve this, you need to
     rebuild Ruby with Readline support. If using Ubuntu, try `sudo apt-get
     install libreadline-dev` and then reinstall your Ruby.
(略)
libreadline.so.7: cannot open shared object file: No such file or directory

libreadlineが見つからないらしい。
pakku -Q readlineでreadlineがインストールされているかを確認する。
readline 8.0が入っているのが確認できた。
archをupdateした直後だったためreadlineがアップデートされたかを確認する。

readlineが7から8に更新されていた。
エラーメッセージのlibreadline.so.7は7を探している感じがあるので、バージョンが上がったことが原因ぽい。

解決方法

byebugのissueにreadlineが7にアップデートされたときの同様の現象が報告されている。
https://github.com/deivid-rodriguez/byebug/issues/307
rubyをビルドしなおすと正しいバージョンを認識するみたいなのでやってみる。
rbenv install -f 2.6.0
再度同じファイルを実行するとエラーはでなくなった。

環境

Arch linux(antergos)
Ruby v2.6.0(by rbenv v1.1.1-39-g59785f6)
readline v8.0.0-1 (original from GNU)

4
1
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
1