Reading How to automatically hyphenate within \texttt? I could not figure it out how to make the ttfamily to hyphenate automatically. The text on the question wordbreaking, justification and ttfamily is not hyphenated. Is there an example about hyphenation with ttfamily?
I tried adding \hyphenchar\font=`\-\relax as suggested by @Skillmon on Minipage/framebox text is not justified and throws several Underfull \hbox (badness 10000) comment, but it still not justified/hyphenated:
\documentclass[10pt,openright,twoside,a5paper]{memoir}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[]{ragged2e}
\usepackage[showframe]{geometry}
\usepackage[brazil]{babel}
\hyphenchar\font=`\-\relax
\begin{document}
\begin{center}
\hspace*{1cm}
{Catalogação na fonte pela Biblioteca Universitária da Universidade
Universitária da Universidade.}
\framebox[\textwidth]
{
\begin{minipage}{\textwidth}
\ttfamily
Lembre-se: a ficha de identificação da obra elaborada pelo autor deve constar no
verso da folha de rosto de teses e dissertações de modo a possibilitar sua
representação precisa pelas informações de autor, título, local, data, número de
folhas, assunto, etc.
\end{minipage}
}
\end{center}
\end{document}


\ttfamilymacro (or invoke the changes in a second macro just after it). – Skillmon Aug 16 '17 at 12:42