Ncurses does not work

Dear community,

any idea how I should set up ncurses?

# test-curses.jl
using Ncurses_jll
ccall(("initscr", libncurses), Cvoid, ())
ccall(("getch", libncurses), Cint, ())
ccall(("endwin", libncurses), Cvoid, ())


# julia --project=. -- test-curses.jl
Error opening terminal: xterm-256color.
1 Like

If you haven’t used curses/ncurses before, I suggest
finding some ncurses C tutorial code on-line and get
that working first as a test case.

A search for your error message suggests that ncurses
is giving you a valid error so the ncurses binary could
be working just fine and the difficulty is not specific to

This indicates that the library cannot find the terminal by this name in a terminfo database. The recommended fix/hack is described in this issue.

As built, the library looks for the database first in ${TERMINFO}, then ${HOME}/.terminfo, and then in /workspace/destdir/share/terminfo. It should look in the share/terminfo folder of the artifact tree (good luck fixing that with autotools), so the hack is to set the envar accordingly.


I forgot to mention that this snippet already works in C within the same console.

1 Like