can't read "env(COLUMNS)": no such variable

Clemens Lang cal at macports.org
Mon Jun 16 16:35:37 PDT 2014


Hi,

> On a 10.6.8 machine without Macports I installed 2.3.0 and get the
> following.
> 
> Any ideas?  Thanks.
> 
> […]
> curl progress callback failed: can't read "env(COLUMNS)": no such variable

Yes, I know why this happens. What I don't understand is why your environment
doesn't contain the columns variable. Which shell do you use? My bash exports
both the COLUMNS and the LINES variables.

Do you redirect MacPorts' output in some way? To trigger this condition your
setup must fulfill the following conditions, and the combination of them is
very unlikely:
 - The $COLUMNS and $LINES variables must be unset
 - Your stdout must be a tty (because the progress output would have been
   disabled if it wasn't)
 - ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) must fail.


As a temporary workaround you can
 - Use verbose mode: port -v
 - Use quiet mode: port -q
 - Redirect the output of port into a pipe: port … | cat

-- 
Clemens Lang


More information about the macports-users mailing list