Coder-Spirit / Jupyter-PHP

A PHP Kernel for Jupyter
MIT License
223 stars 33 forks source link

ERROR: Unable to find the composer executable. #21

Closed kungfooman closed 6 years ago

kungfooman commented 7 years ago
ERROR: Unable to find the composer executable.

By just trying:

root@server:~# ./jupyter-php-installer.phar install
root@server:~# uname -a
Linux 4.4.0-042stab120.20 #1 SMP Fri Mar 10 16:52:50 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux
root@server:~# php -v
PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

Anybody knows how to fix the error?

FinlayDaG33k commented 7 years ago

Have you installed Composer?

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

source: https://getcomposer.org/download/

castarco commented 6 years ago

@kungfooman This is something that could be solved, but should be reported in the issue tracker of the installer.

In any case, @FinlayDaG33k provided you a simple solution.

P.D.: I'm working on a "workspaces" feature, and my next step is to dockerize this software in order to make easier its usage.

adojaan commented 4 years ago

Similar error when trying to install jupyter-php-installer. Composer is installed and command "composer" returns normal output. But

./jupyter-php-installer.phar install sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected sh: 1: Syntax error: "(" unexpected ERROR: Unable to find the composer executable.

FinlayDaG33k commented 4 years ago

That error looks more like there is something else going on with the installer.

adojaan commented 4 years ago

Thank you for the answer. sudo was needed. Although "composer" itself worked normally with regular user, this particular installation needed sudo. Sorry for confusion.

FinlayDaG33k commented 4 years ago

Can happen :> have fun!