The Problem

I use the Kitty terminal emulator with Tmux as my main tool for working with code.

My Tmux settings (~/.tmux.conf) contain the following lines to enable true-color-support:

# true colors
set -g terminal-overrides ',xterm-256color:Tc'
set -g default-terminal "tmux-256color"
set -as terminal-overrides ',xterm*:sitm=\E[3m'

When I open tmux on MacOs I get the following error message:

Cannot read termcap database;
using dumb terminal settings.

The Solution

Solution as a GitHub Gist:

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux.

Download terminfo provided by the tmux maintainers:

curl -sSL > tmux-256color

Follow this guide:

tic -x tmux-256-color
infocmp -x tmux-256color | sed -e 's/pairs#0x10000/pairs#0x1000/' -e 's/pairs#65536/pairs#32768/' > tmux-256color.src
tic -x tmux-256color.src

Verify that terminfo returns the correct value (it should not be null):

infocmp -x tmux-256color