Since upgrading to ncurses-6.1-r2 from ncurses-6.0-r1 I can no longer run Gradle with TERM=xterm-256color $ ./gradlew FAILURE: Build failed with an exception. * What went wrong: Could not open terminal for stdout: could not get termcap entry There is a related Gradle issue here: https://github.com/gradle/gradle/issues/4426 Arch users have solved the problem by upgrading ncurses to 6.1-r3, and there also seems to be some issue related to a ncurses5-compat-libs package that Gentoo doesn't have. Maybe updating to upstream 6.1-r3 will solve the problem? I did _not_ emerge ncurses with minimal, and I _do_ seem to have the xterm-256color files here: $ ls -l /usr/lib/terminfo/x | grep xterm-256color lrwxrwxrwx 1 root root 41 Mar 26 14:54 xterm-256color -> ../../../../etc/terminfo/x/xterm-256color $ ls -l /etc/terminfo/x/xterm-256color -rw-r--r-- 1 root root 3713 Mar 26 14:54 /etc/terminfo/x/xterm-256color Some other info: $ echo $TERM xterm-256color $ tset -q xterm-256color Setting TERM=xterm-color before running Gradle works fine, so the problem seems to be specific to xterm-256color. If there is any other info I can provide to help debug the issue please let me know.
Same problem here. Your proposed workaround (setting TERM=xterm-color) also works for me.
This is probably the same root cause - when trying to reattach screen, it complains about missing termcap info: ticho@vala ~ $ echo $TERM xterm-256color ticho@vala ~ $ screen -r Cannot find terminfo entry for 'xterm-256color'. ticho@vala ~ $ This started after upgrading ncurses from 6.0-r1 to 6.1-r2, just like James mentions. It doesn't seem to be caused by the fact that with 6.1-r2, the entry is a symlink, because "xterm-color" is also a symlink, and it works. I think the contents of the "xterm-256color" are wrong, but as I do not have any experience with how exactly terminfo works, this is just a layman's observation.
(In reply to Andrej Kacian from comment #2) > This is probably the same root cause - when trying to reattach screen, it > complains about missing termcap info: > > ticho@vala ~ $ echo $TERM > xterm-256color > ticho@vala ~ $ screen -r > Cannot find terminfo entry for 'xterm-256color'. > ticho@vala ~ $ > > This started after upgrading ncurses from 6.0-r1 to 6.1-r2, just like James > mentions. Rebuilding screen helped, in my case. If it works for you too, that would suggest a subtle ABI change.
Had the same issue and I can confirm that export TERM=xterm-color solved it for me.
FYI an Arch user fixed it: https://github.com/gradle/gradle/issues/4426#issuecomment-367289638 The relevant changed in the PKGBUILD are: ``` ln -s /usr/lib/libncurses.so.5 "$pkgdir/usr/lib/libtinfo.so.5" - ln -s /usr/lib/libncurses.so.5 "$pkgdir/usr/lib/libtic.so.5" ``` It does not create the `libtic` symlink to the ncurses one. On my system I cannot find neither `libtic` nor `libtinfo`. Even on http://www.portagefilelist.de I was unable to find who own those 2 libraries. I hope to been of some help.
I also confirm that I can now build with gradle again after exporting TERM=....
Just ran into the same issue. Has anyone figured out a root cause? I'm not sure the libtinfo and libtic references are relevant, just did a strace ./gradlew and that only shows "/lib64/libreadline.so.7" and "/lib64/libncurses.so.6" (among other ones of course, but I doubt they're related to this issue). Could it be an ABI change in ncurses? That seems to at least be the reason people were experiencing issues with screen.
*** This bug has been marked as a duplicate of bug 648720 ***
see https://bugs.gentoo.org/648720