Term::ReadKey problems in Cygwin? Install the package vs. CPAN compile

I had an issue running Perl in Cygwin. I could install the modules I needed, but was unable to compile Term::ReadKey due to sgtty or some other challenges. I kept getting annoying messages around perl like this with “sgtty not found” and it seems to be an eternal issue. I found bug reports back to 2000!

ReadKeyerrors
Term::ReadKey in cygwin sgtty not found during cpan compile

I tried many different tactics within perl, but nothing worked. Turns out, there is a cygwin package you can install directly for this issue. You can run the setup.exe or setup64.exe for cygwin and select the

perl-Term-ReadKey

package to get the module going in perl under cygwin. You are also better-off long term on getting apt-cyg going in the cygwin environment to query and install packages easily in the environment and without the need to fire-up the setup.exe app each time you want to install a package.

Getting apt-cyg going in cygwin
Getting apt-cyg going in cygwin

Here is the install of Term::ReadKey via the setup apt-cyg:

Installing perl-Term-ReadKey via apt-cyg
Installing perl-Term-ReadKey via apt-cyg

One Reply to “Term::ReadKey problems in Cygwin? Install the package vs. CPAN compile”

Leave a comment or reply