10

I am currently running Ubuntu 14.04 LTS. Out of nowhere, my 3.6.2 GNOME terminal is returning "terminals database is inaccessible" when the "clear" command is executed. Any suggestions on how I can troubleshoot this problem?

Thanks for the help,

Eric

5
  • Wild guess: what does dpkg -V ncurses-base ncurses-term return? Commented Aug 5, 2016 at 16:40
  • Thanks for the reply steeldriver. "dpkg -V ncurses-base ncurses-term" returns nothing.
    – Eric Smoll
    Commented Aug 5, 2016 at 16:42
  • did this help? superuser.com/questions/319912/…
    – Anwar
    Commented Aug 19, 2016 at 10:32
  • Do you happen to use conda? I had the same issue and found the solution here. github.com/ContinuumIO/anaconda-issues/issues/994
    – Dilmurat
    Commented Aug 24, 2016 at 8:45
  • Hello Dilmurat, I think you are correct. I do use conda and removing conda bin from my path resolves the "terminals database is inaccessible" error. I will pursue the solution in the link you provided. Thank you!
    – Eric Smoll
    Commented Aug 24, 2016 at 16:18

3 Answers 3

10

This can happen a lot with terminal multiplexers (screen, tmux, etc...)

If if you are running one of those, make sure that your TERM is set to screen-256color for the broadest support. I've run into issues in BSD, Linux, Multiple x window managers, etc... from this.

Check for set -g default-terminal screen-256color in ~/.tmux.conf or term screen-256color in ~/.screenrc as TERM is changed by your multiplexer when you load it.

If echo $TERM already says screen-256color try this:

TERM='xterm' clear. If that works, then your terminal emulator doesn't support the standard multiplexer configuration. You might need to add something special for that particular terminal emulator in your bashrc/bash_profile.

Keep in mind that this problem is related to your tool selection and configuration. Ubuntu attempts to choose defaults that work well with other defaults so that everything 'just works'.

2
  • 3
    I was able to solve the problem by just commenting out this line in my tmux conf (which was the example conf shipped with tmux): #set -g default-terminal "tmux-256color"
    – compguy24
    Commented Jan 10, 2019 at 15:36
  • 1
    After you update your .tmux.conf, you can use tmux kill-server to force a reload of the configuration. Commented Jun 2, 2022 at 15:37
0

Open the hidden ~/.bashrc bash customization file, see if the clear command is being overridden with something else, then comment it with an hash at the start of the line, close the terminal and restart, or type in . ~/.bashrc to refresh the bashrc script immediately.

Also both the commands env and set will give you information about the environment variables of your OS, you can start troubleshooting there.

4
  • just run alias to see a list of aliases
    – Amias
    Commented Aug 19, 2016 at 10:33
  • Hello Amias. I was unaware of this usage of the alias command. Thank you for the suggestion.
    – Eric Smoll
    Commented Aug 24, 2016 at 16:25
  • Hello uncanny_valley. There was no alias interfering with my usage of the clear command. Thank you for the troubleshooting suggestion. As it turns out, user Dilmurat was correct in assuming that my conda installation has an ncurses issue that was interfering with my usage of the clear command.
    – Eric Smoll
    Commented Aug 24, 2016 at 16:30
  • @EricSmoll No problem, glad you managed to solve the problem. Commented Aug 24, 2016 at 18:28
0

Either your $TERM variable is not right or your TERMCAP db is corrupted.

This message occurs when your terminal type cannot be matched in the TERMCAP database.

the termcap database on ubuntu 16.04 is in /lib/terminfo , not sure if its the same on 14.04 , there must be an file in that tree of the same name as the value in your $TERM.

the ncurses-base package manages this , check if its installed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .