2

I installed tmux 1.5 on Centos. The installation went ok after installed libevent and other libraries, but when I run tmux I keep getting the following error.

tmux
fatal: server_start: daemon failed: No such device

Any idea what's causing this?

Tathagata
  • 183
  • 1
  • 1
  • 9

2 Answers2

1
file /dev/null /dev/null 
empty 
ls -l /dev/null 
-rw-r--r-- 1 root root 0 Sep 14 06:16 /dev/null

It means that your /dev/null is not a character device and has wrong permission. Below is my:

file /dev/null 
/dev/null: character special
ls -l /dev/null 
crw-rw-rw- 1 root root 1, 3 Sep 14 14:44 /dev/null

Do the following command as root to recreate it:

# rm -f /dev/null && mknod -m 666 /dev/null c 1 3

and try again.

quanta
  • 50,327
  • 19
  • 152
  • 213
0

I am too new to SF, so I am not allowed to post a comment. Sadly, I need to post this in the form of an answer...

Try running:

strace -o TMUX-DEBUG.txt tmux

strace output will get dumped to the file TMUX-DEBUG.txt.

If you haven't used it before, strace is an extremely useful program that tracks all system calls an executable makes. Chances are moderately high that you will see the specific function call that causes this error, which can lead you to the device it's trying to call, or even more useful clues.

Basically, strace allows you to iniate extremely powerful "detective" work when trying to track these kinds of things down.

There's also 'ltrace', which tracks user-level calls. It too can be useful. Let me know if strace shows anything that jumps out at you. Good luck.

Larold
  • 802
  • 4
  • 13
  • 21
  • @Laroid good point - forgot about it. There are a few `ENOENT` (No such file or directory) like `lstat("/tmp/tmux-0/default", 0x7fff50dc6790) = -1 ENOENT (No such file or directory)` ... all of which look like `tumx` wants a .conf or default file which is not not present. Let me google for some default tmux files, put it in there and try it out. Is there some post installation foo one needs to do with tmux? – Tathagata Sep 14 '11 at 11:25
  • @tath I'll be honest - I'm a screen junkie who hasn't gotten around to trying tmux. It is common in strace output to see ENOENT errno values returned as an executable does exactly what you describe - searches through potential locations for files that result in a no-hit. Try searching for the string 'No such device' in the strace output and take note of non-zero return codes in the few calls above that output. Often, but not always, the clue you need appears shortly before the error is dumped to STDERR. – Larold Sep 14 '11 at 18:51
  • Dude thanks for the detailed input .. But @quanta's solution is spot on. and I can `tmux` now .. now I can see the youtube videos on `tmux` and get familiar with it. Sorry I can't vote up your answer coz I have only 11 reputation here ... – Tathagata Sep 15 '11 at 04:18