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 https://gist.github.com/nicm/ea9cf3c93f22e0246ec858122d9abea1 > tmux-256color

Compile tmux-256color terminal info:

/usr/bin/tic -xe tmux-256color terminfo.src

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

infocmp -x tmux-256color