cpan error: Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work
Asked Answered
M

2

8

ActiveState Perl - 5.26 on Windows 10 - 64 bit.

When I am trying to launch cpan from CMD - I see the following error:

C:\Users\orenm>cpan
Unable to get Terminal Size. The Win32 GetConsoleScreenBufferInfo call didn't work. The COLUMNS and LINES environment variables didn't work. at C:\Perl64\lib/Term/ReadLine/readline.pm line 410. 

Why does it happen? What shall I do with it?

Monroe answered 23/1, 2019 at 10:9 Comment(0)
F
8

It's trying to figure out your terminals size. You can use a 'dumb' terminal.

set TERM=dumb

will eliminate the warning.

Flavor answered 30/4, 2020 at 14:38 Comment(1)
This is a reasonable work around, but it seems like the builders of Win versions of perl (Strawberry in my case) aren't including common sense Windows perl modules that are in cpan to their distributions as a default.Swaraj
J
1

In PowerShell the equivalent syntax is

$env:TERM="dumb"
Jessen answered 4/6, 2024 at 14:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.