1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

terminals database is inaccessibleを解決した時のメモ

Last updated at Posted at 2021-01-22

問題の概要

とあるDockerコンテナ内でclearコマンドを使ったら

terminals database is inaccessible

が出ました。コンテナはDebianベースの環境です。

解決法

まずterminfoをインストールします。

$ apt install ncurses-term

次に、~/.profileにterminfo関連の環境変数を設定します。

~/.profile
export TERMINFO=/usr/share/terminfo
export TERM=xterm+256color

編集後はsource ~/.profileで変更を適用します。

TERMINFOにはterminfoファイルのあるパスを、TERMにはその中にあるterminfoファイルを指定します。指定すべき値は環境によって異なる場合があると思います。上記の例ではxterm+256colorのパスは/usr/share/terminfo/x/xterm+256colorになります。

原因

エラーが出ている状態でinfocmpコマンドを実行すると、下記に示すterminfoが見つからないというようなエラーが出ます。

$ infocmp
infocmp: couldn't open terminfo file xterm-256color.

これが原因です。つまり、terminfoを見つけらるようにすれば解決するということです。

参考文献

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?