trogdoro / xiki

A shell console with GUI features
http://xiki.org
Other
3.76k stars 208 forks source link

One line installer fails #140

Closed haslinger closed 9 years ago

haslinger commented 9 years ago

One line installer fails on fresh Ubuntu 14.04.1 server with

xiki-master/bin/xsh: line 279: emacsclient: command not found 

so I installed emacs & installed again without any further errors. The script installs libyaml-0-2:amd64 (0.1.4-3ubuntu3.1), ruby (1:1.9.3.4), ruby1.9.1 (1.9.3.484-2ubuntu1.2), libruby1.9.1 (1.9.3.484-2ubuntu1.2) but no emacs.

I have a backup of the virtual machine state before, so I can retry whenever you prefer for as often as you like. :-)

noklesta commented 9 years ago

On Yosemite the install fails even if Emacs.app is installed because the xiki installer tries to use the emacsclient installed by the OS instead:

emacsclient: invalid option -- t
Try `emacsclient --help' for more information

Symlinking /usr/local/bin/emacsclient to /Applications/Emacs.app/Contents/MacOS/bin/emacsclient solves the problem.

trogdoro commented 9 years ago

What does your $PATH look like? If you have /usr/local/bin/ at the beginning, it should get the right one.

the install fails even if Emacs.app is installed

Xsh doesn't try to use Emacs.app, as it currently stands.

xiki installer tries to use the emacsclient installed by the OS

Xiki uses whichever emacsclient is in the path first.

I suppose if the Emacs.app emacsclient is in the path, maybe it should either look for a different emacsclient, or just use the emacs binary in Emacs.app (so people that who want the Emacs.app's emacsclient to be first in the path don't have to change anything).

--Craig

noklesta commented 9 years ago

What does your $PATH look like? If you have /usr/local/bin/ at the beginning, it should get the right one.

I'm sorry, I was being unclear: I did not have Emacs.app's emacsclient in /usr/local/bin/ to begin with, which is why xiki initially found the one installed by the OS in /usr/bin/. I had to manually symlink Emacs.app's emacsclient to /usr/local/bin/ to make xiki installation work.

either look for a different emacsclient, or just use the emacs binary in Emacs.app (so people that who want the Emacs.app's emacsclient to be first in the path don't have to change anything).

It would be excellent if xiki could search for alternative emacsclients if the first one it finds doesn't work. Unfortunately, the one installed by Emacs.app in /Applications/Emacs.app/Contents/MacOS/bin/ will probably not be in the path for most people, so perhaps the xiki installer should ask the user for permission to symlink it to /usr/local/bin/ if necessary?

Thanks a lot for xiki by the way - it looks amazing!

trogdoro commented 9 years ago

I have a backup of the virtual machine state before, so I can retry whenever you prefer for as often as you like. :-)

Please try again with the latest one-line installer from xiki.com

Before you install anything on your vm, please tell me what the output of this is:

$ emacs_version=emacs --version 2>&1 $ echo $emacs_version

It shouldn't be going to the emacsclient... line in xiki-master/bin/xsh unless your emacs version is 23 or 24, in which case emacsclient should exist (and presumably be in your path).

On a more general note, I haven't had this problem with ubuntu 14.04.

Stop into http://webchat.freenode.net/?channels=xiki if you're around, and can provide more clues!

--Craig

On Sat, Apr 4, 2015 at 12:42 PM, Stefan Haslinger notifications@github.com wrote:

One line installer fails on fresh Ubuntu 14.04.1 server with

xiki-master/bin/xsh: line 279: emacsclient: command not found

so I installed emacs & installed again without any further errors.

I have a backup of the virtual machine state before, so I can retry whenever you prefer for as often as you like. :-)

— Reply to this email directly or view it on GitHub https://github.com/trogdoro/xiki/issues/140.

haslinger commented 9 years ago

The output of the tasks is as follows:

stefan@kant:~$ emacs_version=`emacs --version 2>&1`
stefan@kant:~$ echo $emacs_version
Das Programm »emacs« ist in folgenden Paketen enthalten: * emacs24 * emacs24-nox * e3 * emacs23 * emacs23-lucid * emacs23-nox * emacs24-lucid * jove Versuchen Sie: sudo apt-get install <ausgewähltes Paket>

And the output of the installing process is the old one, this time in it's full glory:

stefan@kant:~$  cd ~; curl -LO https://github.com/trogdoro/xiki/archive/master.tar.gz ; tar xzf master.tar.gz; cd xiki-master/bin; ./clearxsh; ./xsh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   121    0   121    0     0    125      0 --:--:-- --:--:-- --:--:--   125
100  559k  100  559k    0     0   176k      0  0:00:03  0:00:03 --:--:--  440k

It looks like you haven't yet installed the dependencies
xsh needs. Install them? (You can optionally install the
dependencies yourself first.)

  install the dependencies
  cancel
  show them first

Type one of the highlighted letters: i

Installing the dependencies. Could take a few minutes...

[sudo] password for stefan: 
Vormals nicht ausgewähltes Paket libyaml-0-2:amd64 wird gewählt.
(Lese Datenbank ... 85677 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../libyaml-0-2_0.1.4-3ubuntu3.1_amd64.deb ...
Entpacken von libyaml-0-2:amd64 (0.1.4-3ubuntu3.1) ...
Vormals nicht ausgewähltes Paket ruby wird gewählt.
Vorbereitung zum Entpacken von .../ruby_1%3a1.9.3.4_all.deb ...
Entpacken von ruby (1:1.9.3.4) ...
Vormals nicht ausgewähltes Paket ruby1.9.1 wird gewählt.
Vorbereitung zum Entpacken von .../ruby1.9.1_1.9.3.484-2ubuntu1.2_amd64.deb ...
Entpacken von ruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
Vormals nicht ausgewähltes Paket libruby1.9.1 wird gewählt.
Vorbereitung zum Entpacken von .../libruby1.9.1_1.9.3.484-2ubuntu1.2_amd64.deb ...
Entpacken von libruby1.9.1 (1.9.3.484-2ubuntu1.2) ...
Trigger für man-db (2.6.7.1-1ubuntu1) werden verarbeitet ...
libyaml-0-2:amd64 (0.1.4-3ubuntu3.1) wird eingerichtet ...
ruby (1:1.9.3.4) wird eingerichtet ...
ruby1.9.1 (1.9.3.484-2ubuntu1.2) wird eingerichtet ...
libruby1.9.1 (1.9.3.484-2ubuntu1.2) wird eingerichtet ...
Trigger für libc-bin (2.19-0ubuntu6.6) werden verarbeitet ...

./xsh: Zeile 281: emacsclient: Befehl nicht gefunden
stefan@kant:~/xiki-master/bin$ 

So maybe the clue is, that it's not running in the English locale? I'm GMT +2 over here and quite busy these days, but I will chime in the chat every now and then ...

haslinger commented 9 years ago

Next:

stefan@kant:~$ emacs --version
Das Programm »emacs« ist in folgenden Paketen enthalten:
 * emacs24
 * emacs24-nox
 * e3
 * emacs23
 * emacs23-lucid
 * emacs23-nox
 * emacs24-lucid
 * jove
Versuchen Sie: sudo apt-get install <ausgewähltes Paket>
haslinger commented 9 years ago

A working one liner for Ubuntu (also working if installed with a locale different from en_GB) is:

LANG=en_GB.UTF-8; LANGUAGE="en_EN"; cd ~; curl -LO https://github.com/trogdoro/xiki/archive/master.tar.gz ; tar xzf master.tar.gz; cd xiki-master/bin; ./clearxsh; ./xsh
trogdoro commented 9 years ago

Stefan and I tracked this down in the #xiki irc channel, and I just did a push that should fix it. Thanks for the troubleshooting help, Stefan!