This article is from the 3b1 computers FAQ, by John B. Bunch with numerous contributions by others.
One of the packages' Install scripts (apparently that of "Curses/Terminfo Programmers Package"), copies curses.h to /usr/include anticipating that the directory has already been created by a previous package's Install script. If /usr/include doesn't exist yet because the packages weren't installed in the right order, the Install script will make a *file* called /usr/include, which is really curses.h.
To prevent this from happening, install the packages in this order:
Curses/Terminfo End User Package Development Set 3.5x Curses/Terminfo Programmers Package
 
Continue to: