I can't clear the terminal in Mac OS X Lion - "terminals database is inaccessible"
In Mac OS X Lion 1.07, Terminal now supports 256 colors, Background Color Erase (BCE) and some other features that make it more compatible with modern xterm, and the default value for $TERM is now xterm-256color instead of xterm-color (which represents an older branch of xterm with less functionality).
If you upgrade to Lion, any settings profiles that used xterm-color will use the new default. (All "Declare terminal as" does is set the value of $TERM, by the way.)
The error you're seeing indicates that the appropriate terminfo files for xterm-256color are either missing or inaccessible. You might try installing Lion again. Also, some people have reported that installing Xcode 4 on Lion can cause this problem.
You can test the validity of xterm-256color with the following shell command:
infocmp xterm-256color
This will either display an error or the appropriate terminfo values for xterm-256color, and, if found, it displays the pathname to the terminfo file it used.
xterm-256color should be present in /usr/share/terminfo/78
.
Run this command and double check if it's there:
ls -laR /usr/share/terminfo
In the past, there were issues with Xcode messing up permissions to a huge degree. Worst case scenario, use disk utility and repair your permissions. You will need to boot from an install DVD and verify/repair your boot partition.
Looks like your TERM
value isn't recognized. You are probably setting the TERM value in your .profile
(or similar) or you've got missing/corrupt files or invalid permissions in /usr/share/terminfo/
.