Ubuntu – clear command – terminals database is inaccessible

16.04command line

I am using Ubuntu 16.04 while using clear in terminal, it produces error
terminals database is inaccessible

But when I use sudo clear it works as intended. I have removed some files in /var/www/ and this problem started. I checked this question "clear" command in GNOME terminal returns "terminals database is inaccessible" but that did not help in any way

Edit: Output of strace -etrace=open clear

open("/home/user/anaconda3/bin/../lib/tls/x86_64/libncursesw.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/home/user/anaconda3/bin/../lib/tls/libncursesw.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/home/user/anaconda3/bin/../lib/x86_64/libncursesw.so.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/home/user/anaconda3/bin/../lib/libncursesw.so.5", O_RDONLY|O_CLOEXEC) = 3

open("/home/user/anaconda3/bin/../lib/libc.so.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)

open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3

terminals database is inaccessible

+++ exited with 1 +++

Best Answer

Path for Anaconda3 is set in .bashrc. It is interfering with clear command. Removing Anaconda path from path solved the issue. Here is the github reference for the issue https://github.com/ContinuumIO/anaconda-issues/issues/331

Related Question