go - GoLang - termbox: panic: open /dev/tty: no such device or address -
I am coding with Ubuntu 12.04 LTS machine with GO 1.2 - using Litidy (very pleased) I downloaded and installed the demo keyboard. GO - Made Easy But when I run from Liteide, I get this panic - it all happens with the wording demonstration: Any clue will be useful .... panic: open / dev / tty: so No device or address
Unlike Windows, in which a console window is created to run the "console" type of program and an application is attached to it, there is no "type" of applications on the POSIX system, and if any action For your I / O Wants a real terminal, it is a special check for it, and if it fails, the application becomes prompts an error and 1 finish. Very few people have access to the actual hardware terminals, so most of the time emulation is used, and then we talk about the so-called Linux Virtual Terminals and GUI Terminal Emulator and Terminal Console Multiplexers like Screen
and . tmux
& mdash; They allocate pseudo-terminals to run all programs.
So you have these options:
-
Find a setting in your IDE which assigns a pseudo-terminal to your program. Some programs can do this by embedding such a terminal emulator in their UI or by running it explicitly.
-
Teach your IDE to run your program in Terminal Emulator. Most of them follow the conference established by the respected
xterm
and-e & lt; Program & gt;
accept the command line option, so./ myprogram
should run your IDE
Xterm -e ./myprogram
If you 're again on the Debian system or its derivative, you
the X-terminal-emulator -e ./myprogram
Your preferred terminal emulator program may be away from
-
Stop playing the code in the IDE and do it in a regular terminal emulator
go build / myprogram
Workflow
I have never used Lighted so that I do not have any immediate experience with doing so & mdash; You have to do your own research.
1 Some programs can happily work with or without shelling the terminal (like bash
or Zsh
) and interpreters (like Tcl or
Python
) are good examples: when they find a terminal device available, they go into interactive mode , Enable line editing, otherwise they just read the code from their standard input and execute it. Another good example is Git: its high level programs are detected whether they are connected to the terminal and if they can enable the color of their output and automatically generate the pager program, if their output Is about overflowing a screening lines; Otherwise they bite the nuisance and dump their output into their standard output stream.
Comments
Post a Comment